|
Patch for doing the upgrade. I tried, but it fails b/c users have to login for each page request. Also, signup fails with the following error:
Signup: WARN [btpool0-3] VisitorFieldValidator.warn(45) | The visited object is null, VisitorValidator will not be able to handle validation properly. Please make sure the visited object is not null for VisitorValidator to function properly WARN [btpool0-3] Dispatcher.warn(49) | Could not find action or result No result defined for action org.appfuse.webapp.action.SignupAction and result input I posted the following question on the Struts mailing list - no solution yet.
http://www.mail-archive.com/user@struts.apache.org/msg87713.html Integration tests now pass on web/struts. However, integration tests still test when creating an archetype. Not sure why.
[exec] PasswordHint: [exec] DEBUG [btpool0-3] PasswordHintAction.execute(45) | Processing Password Hint... [exec] WARN [btpool0-3] Dispatcher.warn(49) | Could not find action or result [exec] No result defined for action com.mycompany.webapp.action.PasswordHintAction and result success [exec] at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:363) Archetypes now work thanks to Dustin Pearce's help. Still need to refactor to use the convention plugin and change AMP to generate convention-friendly code.
If you look at the FishEye tab on this issue, you should see all the changes related to it. Hopefully that'll help:
http://issues.appfuse.org/browse/APF-1130?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel |
|||||||||||||||||||||||||||||||||||
1. Follow instructions
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
just ignore change related to web.xml StrutsPrepareAndExecuteFilter usage - it will not work with Sitemesh as it will strap all attributes
2. Update web.xml with appropriate filters
2.a struts-cleanup filter is not required anymore and 2 struts filter instead of one before
BEFORE 2.1 :
<filter>
<filter-name>struts-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
AFTER :
<filter>
<filter-name>struts2-prepare</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.peak6.weseed.webapp.admin.action</param-value>
</init-param>
</filter>
<filter>
<filter-name>struts2-execute</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.peak6.weseed.webapp.admin.action</param-value>
</init-param>
</filter>
2.b sitemesh filter should sit in the middle of two struts filters:
BEFORE 2.1 :
<filter-mapping>
<filter-name>struts-cleanup</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
AFTER :
<filter-mapping>
<filter-name>struts2-prepare</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>struts2-execute</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
3. You may remove Codebehind Plugin (optional) as since 2.1 this plugin has been deprecated in favor of the Convention Plugin