WebSphere发布war包 访问JSP报403错误,访问HTM正常

lfbf109 2010-07-12 05:05:37
Struts2+Hibernate3+Spring的框架,在TOMCAT下面正常,打成war包发布上WebSphere后,访问jsp文件报403错误,而访问html文件却正常显示,不知道为什么。

web.xml文件如下
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>

<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
WEB-INF/classes/applicationContext.xml
</param-value>
</context-param>

</web-app>
...全文
709 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
billlion 2012-11-21
  • 打赏
  • 举报
回复
开trace看下log里有什么异常没
crazyjava1 2012-11-19
  • 打赏
  • 举报
回复
问题怎么解决的啊?我今天也遇到这个问题了!
gyj20061111 2010-07-13
  • 打赏
  • 举报
回复
WebSphere 支持spring还有点问题。需要配置一个参数,进was控制台,
应用程序服务器 > WebSphere_Portal > Web 容器 > 定制属性 下加上如下参数:
com.ibm.ws.webcontainer.invokefilterscompatibility=true

重启服务器。

2,633

社区成员

发帖
与我相关
我的任务
社区描述
WebSphere 是 IBM 的软件平台。它包含了编写、运行和监视全天候的工业强度的随需应变 Web 应用程序和跨平台、跨产品解决方案所需要的整个中间件基础设施,如服务器、服务和工具。
社区管理员
  • WebSphere社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧