(Whoops; wrong button.)

Depending on how your application is laid out you could also put a "catch-all" 
mapping at the end of your regular mappings, like so:

<action name="*">
  <result>/static/{1}.jsp</result>
</action>

Again, this is if you're intent on using XML configuration.

Dave

--- On Sun, 7/13/08, Pierre Thibaudeau <[EMAIL PROTECTED]> wrote:

> From: Pierre Thibaudeau <[EMAIL PROTECTED]>
> Subject: [S2] action mapping with merely default action
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Date: Sunday, July 13, 2008, 4:43 PM
> With Struts1, if I wished to render a JSP page without
> bothering with the
> machinery of an action (yet going through the
> filters/interceptors), I would
> have an action mapping as follows:
> 
>         <action path="/home"
> forward="/static/home.jsp" />
> 
> With Struts2, in the same situation, I would do:
> 
>         <action name="home"
> class="com.opensymphony.xwork2.ActionSupport">
>             <result>/static/home.jsp</result>
>         </action>
> 
> This is a case where Struts2 is a lot wordier than Struts1.
>  (I have to do
> this about 15 times, for the site's "static"
> pages...)
> 
> Is there a shorthand version?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to