Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Struts2';s约定插件不';t扫描WEB-INF/lib中的JAR_Struts2_Jar_Convention - Fatal编程技术网

Struts2';s约定插件不';t扫描WEB-INF/lib中的JAR

Struts2';s约定插件不';t扫描WEB-INF/lib中的JAR,struts2,jar,convention,Struts2,Jar,Convention,我将一些操作打包在jar文件中,并将这些文件放在WEB-INF/lib中。 此外,我还配置了struts.convention.action.includeJars常量。但我发现约定插件不能扫描WEB-INF/lib中的JAR。请参阅org.apache.struts2.convention.PackageBasedActionConfigBuilder 我的环境: -tomcat 6.0.5 -支柱2.3.14.3 GA -弹簧3.0.5 约定插件如何扫描我的JAR?是否有任何方法可以重用ja

我将一些操作打包在jar文件中,并将这些文件放在WEB-INF/lib中。 此外,我还配置了struts.convention.action.includeJars常量。但我发现约定插件不能扫描WEB-INF/lib中的JAR。请参阅org.apache.struts2.convention.PackageBasedActionConfigBuilder

我的环境: -tomcat 6.0.5 -支柱2.3.14.3 GA -弹簧3.0.5


约定插件如何扫描我的JAR?是否有任何方法可以重用jar文件中的操作。

struts2.3.14.3 GA的约定插件中有一个bug

请参阅:

获取PackageBasedActionConfigBuilder的最新版本,然后将其添加到struts.xml中:

<bean type="org.apache.struts2.convention.ActionConfigBuilder" name="ActionConfigBuilder_bugfix" class="bugfix.struts2.PackageBasedActionConfigBuilder" />
<constant name="struts.convention.actionConfigBuilder" value="ActionConfigBuilder_bugfix" />


它通过给regex表达式提供一个常量值来进行扫描,该常量值用于mach jar名称。您使用了什么jar名称或表达式?但问题是约定插件不扫描web inf/lib,它只扫描tomcat/lib和web inf/classes。尝试添加struts.convention.action.fileProtocols=jar,zipAnd约定插件无法识别Eclipse中导出的jar。