Struts2 The action solution was not found when deploying with the Convention plugin on WebLogic with a war package

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.