在一个应用程序包部署到websphere6中后,出现一下异常:
[07-1-15 19:18:47:234 CST] 00000027 ActionServlet E Parsing error processing resource path
[07-1-15 19:18:47:250 CST] 00000027 ActionServlet E TRAS0014I: 下列异常已记录 java.net.MalformedURLException: SRVE0238E: 资源路径应该以斜杠开头
at com.ibm.ws.webcontainer.webapp.WebApp.getResource(WebApp.java:1915)
at com.ibm.ws.webcontainer.facade.ServletContextFacade.getResource(ServletContextFacade.java:100)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1002)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
.
.
.
java.net.MalformedURLException: SRVE0238E: 资源路径应该以斜杠开头
...
该应用包在websphere5.x中部署正常,后发现websphere使用的struts版本问题.
Struts 1.1 中,获得资源路径时,前面不带斜线( / ),但在Servlet 2.4规范中,要求在获得一个资源路径时,路径必须是相对与当前上下文根并以斜线( / )开头,在WebSphere Application Server 5.x中使用的是struts1.1版本规则,而websphere6则使用了Servlet 2.4版本的规则,故导致问题出现.
解决办法是:利用websphere6兼容websphere5.x的方法:
具体为:
在WebSphere6 管理控制台中,进入 服务器->对应的服务器名称 -> WEB容器设置->WEB容器 -> 其他属性->定制属性 ->添加
添加下面的属性:
名称:prependSlashToResource
值:true
重启websphere即可.
===补充,因为上面的问题,后来查了文档:发现还有个注意点:这个不知道会不会出现,这里先急着:
§JSP useBean tag
4Tightened conformance to JSP 1.2
4Old: <jsp:useBean id="pg" class="exp.ObjExp.exampleTbl" scope="request" />
4New: <jsp:useBean id="pg" type="exp.ObjExp.exampleTbl" scope="request" />
分享到:
相关推荐
关于 WebSphere 的应用部署关于 WebSphere 的应用部署
在myEclipse6中配置websphere6及部署调试工程实践
文档描述了集群环境下部署应用程序、数据源及web服务器APache 安装 WAS插件安装及配置
多图 详细描述websphere 6 部署全过程。 中文。
在myEclipse6中配置websphere6及部署调试
Websphere6.0应用部署文档
websphere java 部署websphere java 部署
Linux安装WerbSphere Application Server V8.5 1、安装所需要的软件包 agent.installer.linux.gtk.x86_64_1.6.0.zip WAS_ND_V8.5_1_OF_3.zip ...2.3 Installation Manager安装界面中,选中要安装选项。
websphere集群配置与应用程序部署过程总结
WebSphere 6.1应用服务器安装部署手册
websphere应用服务器部署(非常详细的步骤,希望大家喜欢)
Websphere5.1版本日常配置使用,本人手工编写,每...你们理解一个新手的痛苦吗,你们良心何在,底线何在。
WebSphere6.1 linux windowns 安装部署手册
关于websphere的安装配置和web应用的部署教程
在myEclipse6中配置websphere6及部署工程实践
Websphere6集群应用部署手册,此资料通俗易懂,适合新手。
red hat5.8下安装websphere8.5 并部署应用手册: 1安装websphere8.52 2 配置websphere8.5 mysql数据源 3 部署项目
Eclipse+WebSphere部署WAR应用
介绍Websphere6.1程序部署,安装,配置,程序包发布等。