File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes about tiles and tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "about tiles and tomcat" Watch "about tiles and tomcat" New topic
Author

about tiles and tomcat

Allen
Greenhorn

Joined: Jun 12, 2006
Posts: 1
<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

Joined: Jan 10, 2002
Posts: 61415
    
  67

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about tiles and tomcat