私の疑問に似た他の投稿が既にあることは知っていますが、問題は解決できないということです。 外部アプリケーションが(呼び出しを変更することはできません)URLを通じて要求を行うので、私は、名前を「passport.jsp」にマッピングされなければならないサーブレットを持ってhttp://myipserver:portserver/nameApplication/passport.jsp?xxx この時点で私のweb.xmlはここにある:web.xml security-constraintで例外を設定する
<servlet-mapping>
<servlet-name>PortalServlet</servlet-name>
<url-pattern>/passport.jsp</url-pattern>
</servlet-mapping>
問題は、「* .jsp」マッピングであるため、私のsecurity-constraintのマッピングがサーブレットpassport.jspの定義よりも優先されるということです。
<security-constraint>
<display-name>EsconderJSP</display-name>
<web-resource-collection>
<web-resource-name>JSP</web-resource-name>
<description/>
<url-pattern>*.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>jsps</role-name>
</auth-constraint>
</security-constraint>
これを解決する方法を知っている人はいますか?サーブレット "/passport.jsp"を例外として追加することができます。
ありがとうございました。
こんにちは!ご注意いただきありがとうございます。私はあなたの先端で私の問題を解決する。 空きページ web-resource-name> /passport.jsp url-pattern> web- resource-collection> security-constraint> –