Any one worked with the Struts 1 plugin for Struts 2 ?
Its stated features are:
- Can use Struts 1 Actions and ActionForms with no code changes
- Supports Commons Validator-enabled ActionForms
I've got it to work partially where I am able to call the struts1 Action configured thru a strut2 wrapper action. However, only the execute(..) method of the struts1 Action is getting called. I can't figure out how to call different methods as we can do with Struts1 and Struts2. Following is my struts2 configuration (struts.xml):
<package name="integration" extends="struts1-default">
<interceptors>
<interceptor name="loginForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
<param name="className">com.newco.servicelive.struts1.form.LoginForm</param>
<param name="name">loginForm</param>
<param name="scope">session</param>
</interceptor>
</interceptors>
<action name="loginAction" class="org.apache.struts2.s1.Struts1Action">
<param name="className">com.newco.servicelive.struts1.action.LoginAction</param>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="loginForm"/>
<result name="success">test.jsp</result>
</action>
</package>
Any help/comments/suggestions would be greatly appreciated.
Thanks !
Its stated features are:
- Can use Struts 1 Actions and ActionForms with no code changes
- Supports Commons Validator-enabled ActionForms
I've got it to work partially where I am able to call the struts1 Action configured thru a strut2 wrapper action. However, only the execute(..) method of the struts1 Action is getting called. I can't figure out how to call different methods as we can do with Struts1 and Struts2. Following is my struts2 configuration (struts.xml):
<package name="integration" extends="struts1-default">
<interceptors>
<interceptor name="loginForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
<param name="className">com.newco.servicelive.struts1.form.LoginForm</param>
<param name="name">loginForm</param>
<param name="scope">session</param>
</interceptor>
</interceptors>
<action name="loginAction" class="org.apache.struts2.s1.Struts1Action">
<param name="className">com.newco.servicelive.struts1.action.LoginAction</param>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="loginForm"/>
<result name="success">test.jsp</result>
</action>
</package>
Any help/comments/suggestions would be greatly appreciated.
Thanks !