Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.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 jar文件的正确方法是什么?_Struts2 - Fatal编程技术网

打包Struts2 jar文件的正确方法是什么?

打包Struts2 jar文件的正确方法是什么?,struts2,Struts2,从Struts1升级到Struts2时遇到问题 我们的应用程序中有.ear和.war文件。另外我们还有另一个单独的.war文件。 我们能够用Struts2升级和部署.ear文件。 HoWewer当我们尝试部署second.war文件时,出现错误: 无法加载配置。-bean-app config.war/WEB-INF/lib/struts2-core-2.3.15.1.jar/struts default.xml:29:72。。。 原因:Bean已加载名为xwork的Bean类型类com.ope

从Struts1升级到Struts2时遇到问题 我们的应用程序中有.ear和.war文件。另外我们还有另一个单独的.war文件。 我们能够用Struts2升级和部署.ear文件。 HoWewer当我们尝试部署second.war文件时,出现错误:

无法加载配置。-bean-app config.war/WEB-INF/lib/struts2-core-2.3.15.1.jar/struts default.xml:29:72。。。 原因:Bean已加载名为xwork的Bean类型类com.opensymphony.xwork2.ObjectFactory

两个war文件都需要struts2.jar文件。 然后我们尝试将Struts2.jar文件从.war中拉到JBoss lib目录。JBoss AS运行正常,但第一次调用jsp页面时抛出错误:

Servlet jsp的Servlet.service()引发异常 org.apache.jasper.jaspereException:未找到文件“/struts标记”

我们还尝试创建只包含struts2 jar文件的shared.war文件。我们得到了相同的错误:

Servlet jsp的Servlet.service()引发异常 org.apache.jasper.jaspereException:未找到文件“/struts标记”

当单独部署.ear和.war文件时,它们彼此都可以正常运行。 当应用程序有.war和.ear文件时,请建议打包Struts2 jar文件的正确方法。 非常感谢。
Yuri

我发现的一个解决方法是从struts2 core*.jar中提取struts-tags.tld文件,并将其放到每个.war文件的WEB-INF\lib中。确切地说: