【问题标题】:Strange 404/j_security_check error with Websphere 6.1Websphere 6.1 出现奇怪的 404/j_security_check 错误
【发布时间】:2010-10-03 14:15:30
【问题描述】:

我有一个 websphere 6.1 配置并且应用程序正在运行,但是一些请求转到 j_security_check 但最后一个请求(有与 J_security_check 关联的过滤器)会生成 404 错误。

例如:

(1) 用户发帖至: http://localhost:9081/Page/j_security_check 它适用于Filter1, 但后来对 Filter2 的请求得到 404 错误。

(1a) 注意,以下过滤器与 j_security_check 相关联:

<filter-mapping>
        <filter-name>Filter1</filter-name>
        <url-pattern>/j_security_check</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>Filter2</filter-name>
        <url-pattern>/j_security_check</url-pattern>
    </filter-mapping>

(2) 代码到达过滤器代码:

chain.doFilter(req, res);

WASReqURL 具有以下 cookie 值,这是 j_security_check 需要的: http://localhost:9081/Test/test.html

理想情况下,客户端应该以'http://localhost:9081/Test/test.html'结束

但是,我在随后对 j_security_check 的请求中收到 404 错误: http://localhost:9081/Page/j_security_check

另外,这里是 web.xml 文件中的相关 sn-p。

<login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
        <form-login-page>/Go</form-login-page>
        <form-error-page>/Go</form-error-page>
    </form-login-config>
</login-config>

问题是,从 websphere 的角度来看,是什么控制了“J_security_check”。

详情: 雷达7 Websphere Server 6.1,本地盒

【问题讨论】:

  • 我不确定我是否理解。后续请求是来自经过身份验证的用户的第二个请求、来自未经过身份验证的用户的第二个请求还是转发的请求?

标签: websphere rad j-security-check


【解决方案1】:

转到应用程序服务器> server1 > Web 容器> 自定义属性 并确保com.ibm.ws.webcontainer.invokefilterscompatibility 变量设置为true。此变量用作应用程序的j_security_check 开关。

【讨论】:

    【解决方案2】:

    这是 WebSphere 6.1 和 Spring Security 的一个众所周知的问题。

    您需要使用管理控制台将此变量添加到服务器属性:

        com.ibm.ws.webcontainer.invokefilterscompatibility = true
    

    我还记得你需要为 websphere 安装一些补丁,具体取决于确切的版本。

    只需在互联网上查看我提到的变量,您就会找到解决方案...

    希望对你有帮助...

    米格尔

    【讨论】:

      猜你喜欢
      • 2011-03-28
      • 2010-11-05
      • 2011-06-16
      • 1970-01-01
      • 2017-03-14
      • 2015-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多