Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

struts 1 plugin issue

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I need to integrate struts1 in struts2 application. For this I saw one document struts 1 plugin in this url
http://struts.apache.org/2.0.11.2/docs/struts-1-plugin.html I have followed this instructions. It is not working properly
I have included the struts2-struts1-plugin-2.0.11 and struts.jar for struts1. And using the code in struts.xml

<action name="myFormAction" class="org.apache.struts2.s1.Struts1Action">
<param name="className">com.example.action.Struts1SampleAction</param>
<result>/jsp/success.jsp</result>
</action>
I got the Instantiation Exception

If I include the interceptor for Actionform
<package name="struts1 example" extends="struts1-default">
<interceptors>
<interceptor name="scoped-model-driven" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor" />
</interceptors>
<action name="myFormAction" class="org.apache.struts2.s1.Struts1Action">
<param name="className">com.example.action.Struts1SampleAction</param>

<interceptor-ref name="scoped-model-driven">
<param name="className">com.example.action.Struts1Form</param>
<param name="name">struts1Form</param>
<param name="scope">session</param>
</interceptor-ref>
<result>/jsp/success.jsp</result>
</action>

</package>


I got this exception


javax.servlet.ServletException: Unable to create the legacy Struts Action
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

Can you help me please.


Thanks in advance
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sankar,

The <interceptors> is not proper and please refer the below link for better understanding,


http://www.techienjoy.com/Struts-1-Struts2-plugin.php


Thanks !!


--
Regards,

Thangavel L
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic