This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "tiles definition" Watch "tiles definition" New topic

tiles definition

Chris Wang
Ranch Hand

Joined: Jan 13, 2004
Posts: 34
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="" />
<put name="body" value="/common/body.jsp" />
<put name="footer" value="/common/footer.jsp" />
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).
I agree. Here's the link:
subject: tiles definition
It's not a secret anymore!