struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <>
Subject RE: Tiles setup question
Date Tue, 09 Dec 2003 01:42:04 GMT
The global forwards work for struts taglib tags, generally as the value
of the name="" attribute.  They do not export to the web server (servlet
mapping, *.jsp, etc.) level.  Thus, to access the forward you defined:

       <forward name="index" path="/myapp.index"/>

You would say:

<html:link forward="index">[Return to main menu]</html:link>

However, the target of path cannot be a tile, it must be an action which
forwards to the tile. [Is this true?  I have never seen a tile as a
global forward target]

Here is an example:

<%@ taglib uri="/tags/struts-html" prefix="html" %>
<html:link forward="tileTest">[return to main menu]</html:link>

		<forward name="tileTest" path="/"/>
		<action path="/tileTest"

  <definition name=".tileTest" extends="layout"/>

Tim Lucia

> -----Original Message-----
> From: Richard Hill [] 
> Sent: Monday, December 08, 2003 7:59 PM
> To: ''
> Subject: Tiles setup question
> I'm setting up tiles with an example application and I'm 
> getting blocked when trying to use Tiles layout names instead 
> of the JSP filenames in the struts-config.xml. I'm hoping 
> that someone on this list can point out what I'm doing wrong.
> I can access the application by explicitly typing in 
> "index.jsp" in the url, but when I try a page with a link 
> defined in my struts-config.xml global-forwards name="index" 
> I get an error message: The requested resource
> (/myapp/myapp.index) is not available.
> My tomcat localhost.log file show that the Tiles definition 
> factory gets loaded...what am I missing?
> Thanks,
> Richard

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message