Tomcat を介してフォーム ベースの認証を実行している Web アプリケーションでこの問題が発生しており、そのロゴ イメージを含む index.html ファイルにリダイレクトする代わりに、ロゴ イメージ ファイルにリダイレクトされます...
私はするつもりだ:
http://localhost:8080/GenTreeUploader/Servlet
次に、ログインフォームが表示され、正常にログインした後、目的の URL に移動していませんが、次の URL にリダイレクトされます。
http://localhost:8080/GenTreeUploader/images/gdia_logo.png
私が行ったときに認証された後:
http://localhost:8080/GenTreeUploader/Servlet
その後、画像ファイルではなく、正しい場所にリダイレクトされます。
web.xml ファイルを添付しています。
    <?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <!-- WELCOME FILE LIST -->
    <welcome-file-list>
        <welcome-file>/Servlet</welcome-file>
    </welcome-file-list>
    <!-- Security -->
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Wildcard means whole app requires authentication</web-resource-name>
            <url-pattern>/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>tomcat</role-name>
        </auth-constraint>
        <user-data-constraint>
            <!-- transport-guarantee can be CONFIDENTIAL, INTEGRAL, or NONE -->
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
            <form-login-page>/login.jsp</form-login-page>
            <form-error-page>/error.html</form-error-page>
        </form-login-config>
    </login-config>
     <!-- Main Servlet -->
    <servlet>
        <servlet-name>GenTreeUploaderServlet</servlet-name>
        <servlet-class>org.ktu.gdia.presentation.web.GenTreeUploader</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>GenTreeUploaderServlet</servlet-name>
        <url-pattern>/Servlet</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            60
        </session-timeout>
    </session-config>
</web-app>
良い?期待どおりに動作しない理由はありますか? 前もって感謝します。