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

tiles definition

Chris Wang
Ranch Hand

Joined: Jan 13, 2004
Posts: 34
Hi,
I have a problem when I use definition.xml in tiles.
For example, the xml file is like this:
<definition name="mainLayout" path="/layout/classiclayout.jsp">
<put name="title" value="Some title" />
<put name="header" value="/common/header.jsp" />
<put name="menu" value="main.menu" />
<put name="body" value="/common/body.jsp" />
<put name="footer" value="/common/footer.jsp" />
</definition>
I want to add some parameters after body.jsp, just like normal jsp's parameter. So I change one of the above line like this:
<put name="body" value="/common/body.jsp?name=chris&age=30" />
But in definition.xml, The char(&) is not acceptable.
How can I put multi parameters for a jsp in definition.xml?
Any suggestion is welcome.
brad balmer
Ranch Hand

Joined: Mar 08, 2004
Posts: 57
From what I remember, the value can specify the page only.
Why would you want to hard code parameters in the definition? You may have your reasons, but I would think that it would be better to set either a request attribute or a session attribute in the first page and then call the correct getters in the second jsp (or in the intermediate action to pull any DB info).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: tiles definition