`

WAS 6.0.2.9 部署应用使用过滤器问题解决办法

阅读更多

支撑环境: IBM WebSphere Application 6.0.2.9 集群环境

 

需要实现功能:

在用户访问以下链接“t20090526_79507.jsp”时由Filter 转向到同名的“t20090526_79507.html”文件,前提“t20090526_79507.jsp”该文件不存在

过滤之前的链接1:

http://localhost:9080/govweb/zwxx/taya/200905/t20090526_79507.jsp?channelid=1014&channelclass=F

 

这个访问链接1后是经过过滤器转换后并转向的链接:

http://localhost:9080/govweb/zwxx/taya/200905/t20090526_79507.html?channelid=1014&channelclass=F

 

Java过滤器代码:

StringBuffer url = hreq.getRequestURL();

    if(url.substring(url.length()-3, url.length()).equals("jsp")){

       url.replace(url.length()-3, url.length(), "html");

       url.append("?").append(hreq.getQueryString());

       redirect(hreq, hres, url.toString());

       return;

    }

 

 

问题现象:本人在Tomcat和JBoss和WebLogic下测试没有问题,但部署到WAS上之后就会出现

404错误,说文件不存在。

结果终于在网上找到相关资料,原来是WAS的一个Bug,

PK31377: SERVLET FILTER IS NOT CALLED FOR URL RESOURCES WHEN THEY ARE NOT FOUND.

原文是这样写的:

Problem summary 
****************************************************************
* USERS AFFECTED: IBM WebSphere Application Server version 6   *
*                 users of servlet filters.                    *
****************************************************************
* PROBLEM DESCRIPTION: The WebContainer is not calling servlet *
*                      filters when a resource is not found.   *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
During the processing of a request for a particular resource
the WebContainer does not call any custom servlet filters. It
is not uncommon for a developer to write a custom servlet
filter that will modify the request to look in a different
location if a particular resource was not found.
Also, custom servlet filters were are not called prior to
iterating through the welcome file list in search of a resource.
Problem conclusion 
The WebContainer code was modified to call the custom servlet
filters prior to looking for welcome files.  Also, if the
WebContainer cannot find a resource, it will now call the
filters before throwing a FileNotFoundException in case the
filters modify the path to the resource.

The following WebContainer custom property must be set to
'true' for this new behaviour to be enabled:
'com.ibm.ws.webcontainer.invokeFiltersCompatibility'

The fix for this APAR is currently targeted for inclusion in
fixpacks 6.0.2.21 and 6.1.0.9.

Please refer to the Recommended Updates page for delivery
information:
http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980

 

 

结果把先将 WAS升级到 6.0.2.33以后版本,再在WAS服务器容器中添加以下属性后

com.ibm.ws.webcontainer.invokeFiltersCompatibility=true

测试成功!

 

 

 

 

 

这个问题困惑了本人近一个月时间,希望对有相同问题的朋友有所帮助

 

 

  • mytest.rar (9.5 KB)
  • 描述: 过滤器问题测试程序
  • 下载次数: 3
1
0
分享到:
评论

相关推荐

    WebSphere Application Server 6.0.2.9 配置 SqlServer 2000 SP2时出错问题解决

    在IT领域,尤其是在企业级应用部署中,WebSphere Application Server(WAS)是IBM提供的一款强大的Java应用程序服务器,而SQL Server 2000 SP2是微软的数据库管理系统。当配置WAS与SQL Server 2000 SP2集成时,可能...

    memoQ 6.0.58 破解

    memoQ 6.0.58 破解 (複製到安裝路徑下即可破解使用限制) Notable fixes and enhancements since build 6.0.57: •Server installer failed to create database files if built in accounts were localized - fixed...

    WAS6.0文档(Windows)

    在本文档中,我们将深入探讨WebSphere Application Server (WAS) 6.0在Windows操作系统上的安装、升级、卸载以及基本使用方法。WAS 6.0是IBM提供的一款强大的中间件,用于托管企业级Java应用程序和服务。由于WAS 6.0...

    EurekaLog v6.0.25 Enterprise Full Source

    EurekaLog 6.0.25 (16-Nov-2010) Setup Version 1.Added support for Delphi XE and C++Builder XE; 2.A little Call-stack tracing improvment; 3.Add the SafeMM memory manager support; 4.The EurekaLog IDE ...

    Clever Internet .NET Suite 6.0.26.0

    Clever Internet .NET Suite 6.0.26.0 .NET可用于VS2002/2003/2005,包括源代码 <br>Version 6.0.26.0 (8 February 2007) <br>Implemented Features: <br>HTTP Client - HTTPS (SSL / TLS) protocol, ...

    WAS6.0ND版安装及集群配置

    WebSphere Application Server(简称WAS)是IBM提供的一款企业级应用服务器,版本6.0 Network Deployment(ND)是其网络部署版,支持集群配置,提供了高可用性和负载均衡等功能。在本教程中,我们将深入探讨如何安装...

    RIDE 在was6.0下的安装

    【RIDE在WAS6.0下的安装】文档主要针对的是报表集成开发平台RIDE在迁移到WebSphere Application Server(WAS)6.0版本时的安装过程和可能遇到的问题,旨在为RIDE的开发和维护团队提供详细的指导。以下是对这一主题的...

    IHS无法通过80端口连接到WAS应用端口的参考解决办法

    "IHS无法通过80端口连接到...IHS无法通过80端口连接到WAS应用端口的问题是由于IHS的配置文件或插件配置文件不正确所引起的,解决办法可以通过观察IHS的配置文件、生成插件配置文件和覆盖插件配置文件并重启IHS来解决。

    在WAS6.0 ND中实现集群

    在IBM的WebSphere Application Server (WAS) ...总之,WAS 6.0 ND的集群功能为企业提供了强大的扩展性和高可用性解决方案。通过正确配置和管理,企业可以确保关键业务系统的稳定性和可靠性,适应不断增长的业务需求。

    IBM websphereMQ 6.0 lib

    was6.0的lib,文件列表为: CL3Export.jar CL3Nonexport.jar com.ibm.mq.fta.jar com.ibm.mq.jar com.ibm.mq.jms.Nojndi.jar com.ibm.mq.soap.jar com.ibm.mqetclient.jar com.ibm.mqjms.jar commonservices.jar ...

    PROXMOX VE 6.0 ADMINISTRATION GUIDE.pdf

    One main design goal was to make administration as easy as possible. You can use Proxmox VE on a single node, or assemble a cluster of many nodes. All management tasks can be done using our web-based ...

    WAS6.0文档(Unix)

    - 使用管理控制台或者 wsadmin 命令行工具将应用程序部署到 WAS6.0。部署过程包括选择部署类型(如EAR、WAR、JAR等),配置服务器端的资源,如数据源、JMS 队列等。 6. **WebSphere Application Server 概念**: ...

    XLSReadWriteII v6.0.0.47 for D7 D10.3 Rio

    One of the major goals with XLSReadWriteII was to create a product that won't corrupt the Excel files and won't alter any data in the file. The engine that handles XLSX files is automatically built ...

    WAS V6.0认证_SelfSign

    "WAS V6.0认证_SelfSign"的主题涉及到IBM WebSphere Application Server (WAS) V6.0版本中如何进行SSL(Secure Socket Layer)自签名证书的配置,以及这种自签名证书如何与IBM HTTP Server进行通信的过程。...

    解决网上应用厅部署在was上jar包冲突问题

    ### 解决网上应用厅部署在WAS上JAR包冲突问题 #### 背景介绍 在企业级应用开发与部署的过程中,经常会遇到各种技术挑战,其中之一就是在WebSphere Application Server (WAS) 上部署应用程序时遇到的JAR包冲突问题。...

    WAS8.5.5.0升级及配置JDK1.8.docx

    IBM WebSphere Application Server(WAS)作为一款广泛使用的应用服务器,其升级过程和技术细节对于维护和优化系统性能尤为重要。本文档旨在详细介绍如何将 WAS 8.5.5.0 升级至 8.5.5.13,并配置 JDK1.8 的具体步骤...

    websphere 6.0 for linux.doc

    1. 将WebSphere 6.0的Linux安装包(如/home/soft/IBMWAS60forLinux.tar.gz)复制到WASLinux的/home目录下,可以使用SSH命令完成。 2. 解压安装包:`tar -zxvf IBMWAS60forLinux.tar.gz` 3. 按照安装指南进行配置,这...

    was8.5安装部署文档(图解版)

    **WebSphere Application Server (WAS) 8.5** 是IBM推出的一款高性能的企业级Java应用服务器,支持多种部署模式,包括独立服务器和网络部署(Network Deployment, ND)。该版本引入了IBM Installation Manager (IIM)...

Global site tag (gtag.js) - Google Analytics