Tomcat always redirecting to error page

480 views Asked by At

I'm developing a web application in Java using JSP and Servlets and I'm using Java Form Authentication to authenticate users.

Below is the web.xml configuration for login.

<login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
        <form-login-page>/jsp/login.jsp?action=login</form-login-page>
        <form-error-page>/jsp/login.jsp?action=loginFailed</form-error-page>
    </form-login-config>
</login-config>

When I was developing in my machine, everything was fine. I then moved to test server with SSL enabled for the site. I was testing with https and everytime the <form-error-page> is called and the user is unable to login. Thought the LoginModule returns true, only the form-error-page is called.

EDIT : The reason is not SSL because the same issue is reproduced in my local machine without HTTPS. This occurs in Tomcat version 7.0.90 and does not occur in 7.0.78.

What is the reason and how do I fix this?

0

There are 0 answers