views:

12

answers:

1

Hi, I defined an action like this:

<action name="login" class="tognetti.site.actions.AuthenticationAction">
 <param name="defaultURI">/secure/listaAnnunci.action</param>
    <result>/login.jsp</result>
</action>

I can I access the param from inside the action? Thanks

+2  A: 

You need to implement the Static Parameters interceptor my good man:

<action name="login" class="tognetti.site.actions.AuthenticationAction">
   <interceptor-ref name="defaultStack"/>
   <interceptor-ref name="staticParams">
      <param name="defaultURI">/secure/listaAnnunci.action</param>
   </interceptor-ref>
   <result>/login.jsp</result>
</action>

Then have your Action implement Parameterizable and your param's will be added to the request params map.

Pat
Great! If I extend the struts-default package I have only to implement the interface. Thanks!
s.susini