• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to modify struts-config.xml to migrate struts2?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...
This is my struts-config.xml. How should I change this to migrate struts2? Do I need to create new struts.xml file and put it in src or is it ok to change the existing struts-config.xml to struts.xml?

Please help me...
---------
<form-beans>
<form-bean
name="AddressForm"
type="finalpackage.AddressForm"/>

</form-beans>
<action-mappings>

<action path="/Welcome"
forward="/pages/Welcome.jsp"/>


<action path="/LastTry"
type="finalpackage.FinalAction"
forward ="/pages/FinalJsp.jsp"/>

<action path="/Address"
type="finalpackage.AddressAction"
name="AddressForm"
scope="request"
validate="true"
input="/pages/Address.jsp">
<forward name= "success" path="/pages/success.jsp"/>
<forward name="CANCEL" path="/pages/Welcome.jsp"/>

</action>
</action-mappings>
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Harshani,

Struts 2 is a totally different framework. Even if you change the config file, it won't just work.
 
Harshani Wickramarathna
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
Thank you very much for your reply..

I just tried to combine those struts1 and struts2. i think it is possible. is it?
I added struts2 JARS into my struts1 project,
change the web.xml and add:

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>.

But action mappings in struts 2 are not working.
can you please help me??

thanks and best regards
Harshani
reply
    Bookmark Topic Watch Topic
  • New Topic