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 Java 8 in Action this week in the Java 8 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: 370
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 ?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can this variable be accessed in various JSPs assemebled in tile.xml ?
 
Similar Threads
Tiles problem
Select and trigger an action through a link, doesn't populate the value
session problem
Populating a Dropdown Box
Tiles problem in rendering