Websphere 6.1 出现奇怪的 404/j_security_check 错误

发布于 2024-07-13 04:28:39 字数 1741 浏览 8 评论 0原文

我有一个 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 中的相关片段文件。

<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,本地盒

I have a websphere 6.1 configuration and the application is running, but some requests go to j_security_check but the last one (there are filters associated with J_security_check) will generate a 404 error.

For example:

(1) User posts to:
http://localhost:9081/Page/j_security_check
And it works on Filter1,
but later requests to Filter2 get a 404 error.

(1a) Note, the following filters are associated with 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)
The code reaches the filter code:

chain.doFilter(req, res);

WASReqURL has the following cookie value, this is needed by j_security_check:
http://localhost:9081/Test/test.html

Ideally, the client should end up on 'http://localhost:9081/Test/test.html'

But, I get a 404 error at a subsequent request to j_security_check:
http://localhost:9081/Page/j_security_check

Also, here is relevant snippet in the web.xml file.

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

The question is, what controls 'J_security_check' from the websphere perspective.

Details:
RAD7
Websphere Server 6.1, local box

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暮倦 2024-07-20 04:28:39

转到应用程序服务器> 服务器1> 网络容器> 自定义属性并确保 com.ibm.ws.webcontainer.invokefilterscompatibility 变量设置为 true。 该变量充当应用程序的j_security_check 开关。

Go to Application servers > server1 > Web container > Custom Properties and make sure the com.ibm.ws.webcontainer.invokefilterscompatibility variable is set to true. This variable serves as the j_security_check switch for the application.

莫多说 2024-07-20 04:28:39

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

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

    com.ibm.ws.webcontainer.invokefilterscompatibility = true

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

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

希望它有帮助...

米格尔

This is a very well known issue with WebSphere 6.1 and Spring Security.

You need to add this variable to the server properties using the admin console:

    com.ibm.ws.webcontainer.invokefilterscompatibility = true

also i remember you need to install some patch for websphere, depending on the exact version.

Just look in internet about the variable I mention and you will find the solution...

Hope it helps ...

Miguel

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文