| Author |
how to modify struts-config.xml to migrate struts2?
|
Harshani Wickramarathna
Greenhorn
Joined: Nov 15, 2007
Posts: 28
|
|
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>
|
 |
Alaa Nassef
Ranch Hand
Joined: Jan 28, 2008
Posts: 460
|
|
Dear Harshani, Struts 2 is a totally different framework. Even if you change the config file, it won't just work.
|
Visit my blog: http://jnassef.blogspot.com/
|
 |
Harshani Wickramarathna
Greenhorn
Joined: Nov 15, 2007
Posts: 28
|
|
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
|
 |
 |
|
|
subject: how to modify struts-config.xml to migrate struts2?
|
|
|