Struts2: interceptor and parameters -


i have done pages struts 2.(j2ee project) ok until try add interceptor.

it seems interceptor delete properties of class action , parameters send jsp url like: action?param=xxx

here interceptor:

public class sessioninterceptor extends abstractinterceptor{         @override     public string intercept(actioninvocation invocation) throws exception {          return invocation.invoke();      } 

here struts.xml:

    <action name="movefc_showfjt" class="struts2.showfjtaction" method="movefc">          <interceptor-ref name="sessioninterceptor"></interceptor-ref>         <result name="input" type="dispatcher">jsp/showfjt.jsp</result>         <result name="success" type="dispatcher">jsp/showfjt.jsp</result>      </action>     

in class action,

public class showfjtaction extends actionsupport {   private string param; private personne p; 

param property never receive value jsp (it ok when interceptor off). worse, other properties in class action seems erased. normal effect of return invocation.invoke(); of interceptor ? there can fix ?

y defining own interceptor causing of default interceptors discarded?

should perhaps defining interceptor stack includes interceptor , default stack?

<package name="default" extends="struts-default">    <interceptors>         <interceptor name="sessioninterceptor" class="sessioninterceptor"/>         <interceptor-stack name="mystack">            <interceptor-ref name="sessioninterceptor"/>         </interceptor-stack>     </interceptors>  <action name="movefc_showfjt"      class="struts2.showfjtaction">          <interceptor-ref name="mystack"/>          <result name="input" type="dispatcher">jsp/showfjt.jsp</result>          <result name="success" type="dispatcher">jsp/showfjt.jsp</result>  </action> 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -