Search code examples
jsptomcatauthenticationwebspherej-security-check

Getting HTTP 404 Not Found with multiple requests while using form based authentication


I am having an issue with Tomcat and Websphere when users try to login in our application.

If a user presses multiple times the return key after entering his/her login details, the form is submitted multiple times.

Tomcat and Websphere don't ignore the multiple requests and end up complaining about the /j_security_check url not being available.

After the error happens the solution is to restart the browser/tab, in order to get a new session.

Does anyone know of a possible solution to this issue?

Thanks in advance, Paulo


Solution

  • Use Javascript to disable the button on submit.

    <form onsubmit="this.button.disabled=true">
        ...
        <input type="submit" name="button">
    </form>