Struts Action mapping問題請參考以下內容:
Struts2.18以后版本在Weblogic12c上關于Action注解的運行調整。
weblogic12c在加載項目時會把WEB-INF下的classes目錄打成jar包。并刪除classes目錄下的內容。
struts2.18的Action注解要找jar包,需要jar包內有META-INF/Manifest文件,內容無所謂但要有,因此會造成一般的 struts項目放到Webligic上后注解半不生效。改動在src目錄下添加META-INF/Manifest文件,在struts.xml添加如 下設置:
<constant name="struts.convention.action.includeJars" value=".*_wl_cls_gen.*"/>
<constant name="struts.convention.action.fileProtocols" value="jar,zip" />
<constant name="struts.convention.action.fileProtocols" value="jar,zip" />