Struts not detecting tiles based forwards
Hi,
I am new to struts and tiles; would appreciate your help in solving this issue:
I am using struts along with the tiles plugin in my application. When i try to access a URL (http://localhost:8080/mysite/index.do) mapped to a tiles forward, i am getting the following exception.
javax.servlet.ServletException: Path forum.index does not start with a"/" character
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
The following is an extract from my struts-config.xml
<action-mappings>
<action path="/index"forward="forum.index" />
</action-mappings>
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
And the forward 'forum.index' is defined in my tiles-defs.xml as
<definition name="forum.index" extends="forum.default">
<put name="content" value="/WEB-INF/tiles/pages/index.jsp" />
<put name="pagename" value="Home" />
</definition>
The definition 'forum.default' is not shown, but is present in the tiles-defs.xml...
Could you please tell me what i am doing wrong?
This technique was working when i was using NetBeans 5.5.. But now after porting the application to Eclipse + WTP + Tomcat 5.5, i am getting this error.
Your help is appreciated.
Thanks and regards,
Rakesh TA
[2229 byte] By [
Rakesh.TAa] at [2007-11-26 14:55:41]

# 1
Hi
Did you solve your problem?
i tried this : http://sabrenews.blogspot.com/2007/01/javaxservletservletexception-path.html but it didn't work.
still stucked with this message
javax.servlet.ServletException: Path template.jsp does not start with a "/" character
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
any help is appreciated
# 3
Hi,
could somebody explain what the dot between forum.index is used for?
<definition name="forum.index"
and also, some tutorial using
><action path="/index" parameter="layout"/>
and here use
<action path="/index" forward="forum.index"/>
Can somebody tell me when to use parameter and when to use forward?
Thanks a lot.
# 6
Hello,
Two years passed, this problem alos hits me.
Finally what is the solution?
Thanks.
Pengyou
> Hi,
>
> I am new to struts and tiles; would appreciate your
> help in solving this issue:
>
> I am using struts along with the tiles plugin in my
> application. When i try to access a URL
> (http://localhost:8080/mysite/index.do) mapped to a
> tiles forward, i am getting the following exception.
> > javax.servlet.ServletException: Path forum.index does
> not start with a "/" character
> org.apache.struts.chain.ComposableRequestProcessor.pr
> ocess(ComposableRequestProcessor.java:283)
> org.apache.struts.action.ActionServlet.process(Action
> Servlet.java:1858)
> org.apache.struts.action.ActionServlet.doGet(ActionSe
> rvlet.java:446)
> javax.servlet.http.HttpServlet.service(HttpServlet.ja
> va:689)
> javax.servlet.http.HttpServlet.service(HttpServlet.ja
> va:802)
> The following is an extract from my
> struts-config.xml
> ><action-mappings>
> <action path="/index"forward="forum.index"
> />
></action-mappings>
> <plug-in
> className="org.apache.struts.tiles.TilesPlugin" >
> <set-property property="definitions-config"
> value="/WEB-INF/tiles-defs.xml" />
> <set-property property="moduleAware"
> value="true" />
></plug-in>
> ode]
> And the forward 'forum.index' is defined in my
> tiles-defs.xml as
> [code]
> <definition name="forum.index"
> extends="forum.default">
> <put name="content"
>value="/WEB-INF/tiles/pages/index.jsp" />
><put name="pagename" value="Home" />
> definition>
>
> The definition 'forum.default' is not shown, but is
> present in the tiles-defs.xml...
>
> Could you please tell me what i am doing wrong?
>
> This technique was working when i was using NetBeans
> 5.5.. But now after porting the application to
> Eclipse + WTP + Tomcat 5.5, i am getting this error.
>
> Your help is appreciated.
>
> Thanks and regards,
> Rakesh TA