The original version is 2.3.x, and it needs to be upgraded to 2.5.2 due to security reasons.
1. Version 2.5.2 no longer provides xwork.jar and is integrated into the struts-core package.
2. The problem of the inaccessible method is required to add strict-method-invocation="false" to each action configuration file:
<package name="login" namespace="/login" extends="structs-default" strict-method-invocation="false">
And modify the configuration file header to version 2.5:
<!DOCTYPE struts PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN""http://struts.apache.org/dtds/struts-2.5.dtd">
3. The problem of session failure, add session-descriptor node for weblogic server:
<?xml version="1.0" encoding="UTF-8"?><weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"><context-root>/ynwjnw</context-root><container-descriptor><servlet-reload-check-secs>-1</servlet-reload-check-secs><prefer-web-inf-classes>true</prefer-web-inf-classes></container-descriptor><session-descriptor><cookie-name>JSESSIONID1</cookie-name></session-descriptor></weblogic-web-app>
4. Version 2.5.2 jdk requires 1.7 5, web.xml
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
Modified to:
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
The above is the problems and solutions encountered when upgrading struts to 2.5.2 that the editor introduced to you (recommended). I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!