すべてのエントリ ポイントでユーザー名とパスワードの入力を求めるように Web アプリケーションを設定しています。showStatus
アプリケーションのステータスを表示するように設計された1 つの URL を除いて、すべてに基本認証が必要です。URLはshowStatus
認証を必要としません。問題は、showStatus
URL にアクセスしてもパスワード ダイアログが引き続き表示されることです。showSession
キャンセルまたは [OK] をクリックしてもページにアクセスできますが、 URLのダイアログ ボックスを無効にする方法を知りたいです。
の内容は次のweb.xml
とおりです。
<!-- constraint for restricted pages -->
<security-constraint>
<display-name>restricted access</display-name>
<web-resource-collection>
<web-resource-name>Secure Pages</web-resource-name>
<description/>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>USERS</role-name>
</auth-constraint>
</security-constraint>
<!-- do not require authentication for showStatus URL -->
<security-constraint>
<web-resource-collection>
<web-resource-name>ShowStatus</web-resource-name>
<url-pattern>/showStatus.action</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
</security-constraint>
<!-- need the login prompt to appear for everything but showStatus -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>MYREALM</realm-name>
</login-config>
<security-role>
<role-name>USERS</role-name>
</security-role>