• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with struts tiles

 
sudha javvadi
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,
I am getting the following error with struts tiles.
Error - Tag Insert : No value defined for bean 'base' with property 'null' in scope 'null'.
My code is as follows.
myLayout.jsp

TilesPage.jsp



tiles-defs.xml


could anybody help me in this issue please.

Thanks,
sudha.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "beanName" attribute inserts... a bean. It looks like you're trying to insert a tile definition, so you may want the "name" attribute instead.

See the tiles:insert documentation.
 
sudha javvadi
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply David. How should I call the definition in my TilesPage.jsp file so that I can see the layout defined in the myLayout.jsp.

Sudha.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never used Tiles in this way.

What I've always done is create a definition that extends "base" (in your example) and put a value for the "body" attribute. I'm not sure how you're trying to use it, or what the TilesPage.jsp is for.

Sorry I can't be of more help; I'm just not familiar with the way you're trying to use Tiles.
 
Srikanth Madasu
Ranch Hand
Posts: 48
Eclipse IDE Hibernate Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too never used tiles this way. I can tell you the way i've used it.

Using your myLayout.jsp define a base template in your tiles-defs.xml And then extend it to have a definition for you page. Write the body content you want, in the mypage.jsp - this doesnt'



now you can directly use myPage for rendering purposes.

Hope this helps!!

Srik.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic