You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by haim <ha...@012.net.il> on 2005/04/04 11:07:17 UTC

Forward to tile definition when using modules-modules

The project is growing and we need few developers to work on it.
I am trying to deploy the application using the struts modules.
We are using tiles so every module has it's own module directory
with both tiles-config.xml and struts-config.xml.

I am having the following problems , a lot of my actions are ending with 
a forward to a tile definition.
For example upon success the the forward is newpage.page where 
newpage.page is a tile definition. Before using modules all worked fine, 
but now am getting the following error

java.lang.IllegalArgumentException: Path AgentWelcomePage.page does not 
start with a "/" character

at 
org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:378)

It looks like the controller thinks it is a forward to an action and not 
to a tile.
My web.xml looks like this

<servlet>
<servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/albums</param-name>
    <param-value>/WEB-INF/albums/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

And the struts-config.xml for the albums module has the following plugin 
definition

<plug-in className="org.apache.struts.tiles.TilesPlugin">
<!-- Path to XML definition file -->
<set-property property="definitions-config" 
value="/WEB-INF/albums/tiles-defs.xml" />
<!-- Set Module-awareness to true -->
<set-property property="moduleAware" value="true" />
</plug-in>

Any Ideas what went wrong here ?
Regards
Haim



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org