`
Fangrn
  • 浏览: 798327 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

在WebSphere6.1下调用struts2的action返回404错误的解决办法

阅读更多

这个404 xxx not found,是WAS6.1的一个bug。
解决方法是:
1,首先WAS6.1要升级到6.1.0.3或以上。
2,在WAS Console -> Application Servers -> <server> -> Web Container Settings -> Web Container -> Custom Properties里,增加一个custom property,名字为com.ibm.ws.webcontainer.invokefilterscompatibility,值为true。

详细的见:
http://www.nabble.com/-S2--Websphere-6.1-Showcase-application%2C-Response-already-committed-warning-in-logs-to9679630.html#a9831115

 

 

 

  新做的一个项目基于struts2做为web框架,在tomcat5.5下运行良好,移植到websphere6.1下的时候,访问action返回404未找到文件异常。通过网络搜索,发现这个是websphere6.1的一个bug,首先需要把was61升级到较高的补丁版本,目前本人用的是6.1.0.25版本,然后在was的管理控制台增加一个定制属性。具体步骤:应用服务器-你的服务器名-web容器设置-web容器-定制属性,增加属性名称com.ibm.ws.webcontainer.invokefilterscompatibility,属性值true

 

 

 

1. WebSphere升级到6.1.0.5之后的所有struts2的程序都会发生Action找不到的情况,解决方法如下,服务器>应用程序服务
器>[选择所使用的服务器]>Web 容器设置>Web 容器>定制属性,增加名称为
“com.ibm.ws.webcontainer.invokefilterscompatibility”的定制属性,值为true。
2. 把struts2 的所有包升级到 2.1.7
3. 在web.xml中加上 <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics