permaculture playing cards*
The moose likes Struts and the fly likes confusion on struts tile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "confusion on struts tile" Watch "confusion on struts tile" New topic
Author

confusion on struts tile

alfred jones
Ranch Hand

Joined: Apr 19, 2005
Posts: 279
i have few confusion on struts tile.

in my tutorial i have tiles-def.xml file in WEB-INF folder





i dont understand this tiles-def.xml file.

so i have a question.

question is >>>>>



in the above tiles-def.xml we have



i thought siteLayout.jsp is a simple JSP file. but when i opened this file, i am surprised to see the [B]<tiles:insert> tag in this JSP! this is not a simple JSP...lots of tiles:insert tag in it!

look here i am providing the code for the siteLayout.jsp




look, so many tiles tag are crowded in this JSP!!

does it mean, my other JSP's (which are in the tiles-def.xml) e.g bookList.jsp,index.jsp etc etc should also contain <tiles:insert> tag in them as the above code ?


or , siteLayout.jsp is a special kind of JSP which only can have <tiles:insert> tag in it and no other JSP can have <tiles:insert> tag in them.


i am confused.

please explain this.

thank you
alfred jones
Ranch Hand

Joined: Apr 19, 2005
Posts: 279
unfortunately, my tutorial did not show the code for "index.jsp","bookList.jsp".
so, i am confused whether these JSP's contain <tiles:insert> tags in them.
alfred jones
Ranch Hand

Joined: Apr 19, 2005
Posts: 279
is this a dead forum ?

almost 24 hours passed. nobody responded.

is it a running forum ?
alfred jones
Ranch Hand

Joined: Apr 19, 2005
Posts: 279
or am i too stupid to ask this silly question ?
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Not a dead forum and not a silly question...but I doubt Sunday is the forum's busiest time.

What you are seeing is pretty common. I have worked on a few Struts based projects that had a common base jsp that included common tiles such as navigation, headers and footers along with a configurable content section. In fact what you are seeing is the power of tiles. The welcome and booklist pages extend from base.definition, so they will both have the same general look with a different body.

It is likely that the other jsp files do not contain tiles:insert tags, but they can.

- Brent
 
 
subject: confusion on struts tile
 
Similar Threads
Tiles in struts?
Interesting tiles/struts making a menu question
Problem with struts tiles
Struts-Tiles problem
Tiles Context is there and is not there?