2011-03-29 35 views
1

我想做什麼都在這裏解釋http://middlewaremagic.com/weblogic/?p=2019用戶數據約束不工作

我的web.xml中有此項 <security-constraint> <web-resource-collection> <web-resource-name>Secure pipeline</web-resource-name> <description></description> <url-pattern>/activity/*</url-pattern> <url-pattern>/image/*</url-pattern> <url-pattern>/script/*</url-pattern> <url-pattern>/style/*</url-pattern> <url-pattern>/stylesheet/*</url-pattern> <url-pattern>/page/*</url-pattern> <url-pattern>/infra/*</url-pattern> <url-pattern>/calendar/*</url-pattern> <url-pattern>/async/*</url-pattern> <url-pattern>/ajax/*</url-pattern> <url-pattern>/perfLog/report</url-pattern> </web-resource-collection> <auth-constraint> <description></description> <role-name>authenticated</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>

當我運行的服務器我得到這個 -

Error 403--Forbidden 

從RFC 2068超文本傳輸​​協議 - HTTP/1.1: 10.4.4 403禁止

服務器理解請求,但拒絕履行它。授權不起作用,請求不應重複。如果請求方法不是HEAD並且服務器希望公開爲什麼請求沒有被滿足,那麼它應該描述在實體中拒絕的原因。當服務器不希望揭示請求被拒絕的原因時,或者沒有其他響應適用時,通常使用此狀態碼。

我對此很新。任何想法/建議都會有幫助。

謝謝。

回答

2

先在網上。在

<user-data-constraint> 
    <transport-guarantee>CONFIDENTIAL</transport-guarantee> 

然後 - XML做到這一點您的weblogic服務器的管理控制檯「檢查」啓用的SSL偵聽端口。

然後,這應該將您的普通http調用重定向到url中的https。

0

是的,這表示您正在訪問的URL是受保護的,當您嘗試通過http訪問它時,地址欄會自動顯示https嗎?

另外的403似乎因爲它需要你,當你訪問的網址進行驗證,因爲你的web.xml中有沒有這種auth-constraint在web.xml

<auth-constraint> <role-name>authenticated</role-name> </auth-constraint> 

嘗試

+0

它不會自動更改爲https,即使在刪除之後它也不起作用。 – nasaa 2011-03-29 13:06:21

+0

你有沒有重新啓動網絡應用 – JoseK 2011-03-29 18:35:32

+0

是的,我做到了。 – nasaa 2011-03-30 08:21:43