2

我有一个 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)代码到达过滤器代码:

链.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 文件中的相关片段。

<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”。

详细信息:RAD7 Websphere Server 6.1,本地盒

4

2 回答 2

1

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

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

    com.ibm.ws.webcontainer.invokefilterscompatibility = true

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

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

希望能帮助到你 ...

米格尔

于 2009-04-16T11:45:51.657 回答
1

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

于 2012-01-18T22:08:33.697 回答