aspose file tools*
The moose likes Struts and the fly likes Problem with struts tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with struts tiles" Watch "Problem with struts tiles" New topic
Author

Problem with struts tiles

sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Mar 23, 2007
Posts: 97
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Sep 10, 2008
Posts: 48

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.


If it's easy.. then everybody would do it!
 
Don't get me started about those stupid light bulbs.
 
subject: Problem with struts tiles