struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Bowen <kbo...@als.com>
Subject Problem using xml tiles definition as forward for an Action.
Date Wed, 25 Jul 2007 02:10:54 GMT
Hi,

[Using struts 1.2.7 on Tomcat 5.5]

In tiles-defs.xml, I have the following definition:

<definition name="numberplay.main" extends="baseStandardLayout">
        <put name="page_subheader" value="Number Play"/>
        <put name="javascript"     value="/pages/numberplay/include.js" />
        <put name="body_content"   value="/pages/numberplay/main.jsp"/>
</definition>

I want to use this as the forward from an Action called NumberPlayAction.

In struts-config.xml, I have the following global forward:

<global-forwards>
    <forward name="numberplay_main" path="numberplay.main"/>
</global-forwards>

And I have the following action in the action-mappings:

<action path="/NumberPlay"
          name="nullForm"
          type="com.strongbrain.actions.NumberPlayAction" >
    <forward name="success" path="numberplay_main" />
</action>

With this version of the forward in the action, when leaving 
NumberPlayAction, I get this Exception:

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

But with the following version of the foward,

    <forward name="success" path="/numberplay_main" />

when leaving NumberPlayAction, I get a Status 404:  
         The requested resource (/strongbrain2/numberplay_main) is not 
available.


What am I doing wrong here?
How can I make this work?

Thanks,
Ken Bowen



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


Mime
View raw message