Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about tiles and tomcat

 
Allen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<definition name=".vs_main" path="/layouts/contentlayout.jsp">
<put name="title" value="main"/>
<put name="header" value="/tiles/header.jsp"/>
<put name="footer" value="/tiles/footer.jsp"/>
<put name="leftlist" value="/tiles/left_menulist.jsp"/>
<put name="mainbody" value=" "/>
<put name="query" value=" "/>
</definition>
<definition extends=".vs_main" name=".success">
<put name="title" value="t1"/>
<put name="mainbody" value="/success.jsp"/>
</definition>
<definition extends=".vs_main" name=".vs_user_log_view">
<put name="title" value="t2"/>
<put name="mainbody" value="/contents/manage/userlog/query.jsp"/>
<put name="query" value="/contents/manage/userlog/query_input.jsp"/>
</definition>

I define a ".vs_main" in tiles-defs.xml. There two elements("query" and "mainbody") with a blank value. I do this because some of my pages don't have a query or a mainbody.
When I deploy my project in Tomcat 5.0, everything works well. But when I deploy my project in Tomcat 5.5(jdk5.0), the page print "The requested resource (/WebVSClient/layouts/ ) is not available".

Now I chang the define into this:

<definition name=".vs_main" path="/layouts/contentlayout.jsp">
<put name="title" value="main"/>
<put name="header" value="/tiles/header.jsp"/>
<put name="footer" value="/tiles/footer.jsp"/>
<put name="leftlist" value="/tiles/left_menulist.jsp"/>
<put name="mainbody" value="blank.jsp"/>
<put name="query" value="blank.jsp"/>
</definition>
<definition extends=".vs_main" name=".success">
<put name="title" value="t1"/>
<put name="mainbody" value="/success.jsp"/>
</definition>
<definition extends=".vs_main" name=".vs_user_log_view">
<put name="title" value="t2"/>
<put name="mainbody" value="/contents/manage/userlog/query.jsp"/>
<put name="query" value="/contents/manage/userlog/query_input.jsp"/>
</definition>

The blank.jsp is a blank file. Now it's ok.
But I think this way is not well enough.
I want to know why this difference accors between Tomcat5.0 and Tomcat5.5.
and if there is a mechanism like placeholder in Tiles.

Thank you!!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"akalong513",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic