You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dariusz Wojtas <dw...@myrealbox.com> on 2002/05/01 14:01:29 UTC

Re[2]: atction-mappings and default action path

> we would like to have a default action at the end of our mappings.
> So if none of the other paths matched that the last or default one would be
> executed.
> As far as I know ther is basically no fist or last. But still there must be
> a solouton something like:
> 
> <action-mappings>
>         .
>         .
>         .
>         .
>     <action path="/*"
>         .
>         .    
>         actionClass="my.actionClass"
>         .
>         .    />
> 
>     </action>
> </action-mappings>
> How can something like this be done??

Isn't the property "unknown" for that?
You may create 1 action with unknown set to true.
That will be the default action if no other action matches.
     unknown="true"
Example:
    <action path="/unknown"
            type="some.class"
            unknown="true">
            <forward name="success" path="/my/defaultPage.jsp"/>
    </action>

Darek


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>