aspose file tools*
The moose likes Struts and the fly likes can this variable be accessed in various JSPs assemebled in tile.xml ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "can this variable be accessed in various JSPs assemebled in tile.xml ?" Watch "can this variable be accessed in various JSPs assemebled in tile.xml ?" New topic
Author

can this variable be accessed in various JSPs assemebled in tile.xml ?

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
I have a JSP page, in the JSP, it has a

<s:url action="myaction">
<s;parameter name="index" value=...>...

</s:url>

link that points to an "myaction". In struts.xml file there is a mapping for it

<action name="myaction" class="....">
<result name="success" type="tiles">mytile</result>
</action>

it output goes to "mytile" defined in tiles.xml:

<definition name="mytile" template=".."
><put-attribute name='header" value="header.jsp"/>
<put-attribute name="body" value="index.jsp"/>
<put-attribute name="footer" value="footer.jsp"/>
</definition>

Question is -- when I click the <s;url> link, it directs to 'mytile' whihc is composed of a few JSP pages. Is the paramer 'index" I set in the ><s:url> accessible by ALL of the JSPs defined in the tiles.xml's 'mytile' section ? It seems it should but I had problem getting it, is there anything fundamentally wrong in my concept ?

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: can this variable be accessed in various JSPs assemebled in tile.xml ?