Environment: Struts 2.3.16.3 + Convention Plugin 2.3.16.3 for Zero Configuration
Symptom: When deployed as a folder on WebLogic (10.3.3), everything is fine, switch to the war package deployment, and the run-time prompt cannot find the action
Workaround:
1. Check if there is a meta-inf directory under \web-inf\classes\ in the generated war package, and if not, place a file in Eclipse Resource\meta-inf. such as Test.xml, the Meta-inf directory is created under classes when MAVEN packs a war package.
Two constants added in 2.struts.xml
<name= "Struts.convention.action.fileProtocols" value= "Jar,zip" /> <name= "Struts.convention.action.includeJars" value= ". *?/_wl_cls_gen.*?jar (!/)?" />
Note: If you want to Weblogic/jboss kill, you can add a constant, that is, a total increase of 3 constants
1 <constantname= "Struts.convention.action.includeJars"value= ". *?/_wl_cls_gen.*?jar (!/)?" /> 2 <constantname= "Struts.convention.exclude.parentClassLoader"value= "true" />3 <constantname= "Struts.convention.action.fileProtocols"value= "Jar,zip,vfsfile,vfszip" />
Example: Struts-spring-rest.zip
Struts2 The action solution was not found when deploying with the Convention plugin on WebLogic with a war package