• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tiles definition

 
Chris Wang
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic