2009-01-26 94 views
2

我有一個websphere 6.1配置和應用程序正在運行,但一些請求轉到j_security_check,但最後一個(有與J_security_check關聯的過濾器)將生成404錯誤。與Websphere 6.1發生奇怪的404/j_security_check錯誤

例如:

(1)用戶員額: http://localhost:9081/Page/j_security_check 而且它適用於過濾器1, 但後來請求對過濾器2得到一個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

但是,我在隨後的請求,得到一個404錯誤j_security_check: 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服務器6.1,本地箱

+0

我不知道我明白了。後續請求是來自經過身份驗證的用戶的第二次請求,是未經身份驗證的用戶的第二次請求還是已轉發的請求? – Konrad 2009-02-12 23:35:56

回答

1

轉到應用程序服務器> server1的>網絡容器>自定義屬性,並確保com.ibm.ws.webcontainer.invokefilterscompatibility變量設置爲true。該變量用作應用程序的j_security_check開關。

1

這是一個與WebSphere 6.1和Spring Security的非常有名的問題。

您需要將此變量添加到使用管理控制檯服務器屬性:

com.ibm.ws.webcontainer.invokefilterscompatibility = true 

還我記得你需要安裝一些補丁的WebSphere,根據確切的版本。

只要看看在約我提到,你會找到解決辦法的可變互聯網...

希望它可以幫助...

米格爾