Search code examples
javahibernatejbossstrutshttp-error

http status 408 in j_security_check using JBoss


Currently I'm facing strange problem. I have one demo application which just authenticate user from database and shows welcome page.

The problem is if I keep login page open and then after restarting server, try to login using the same page which is opened earlier, screen shown me HTTP Status 408 - The time allowed for the login process has been exceeded. error.

I tried the suggested changed in HTTP Status 408 error during login with domain forwarding set up link but it's not working.

This is my login page :

<!DOCTYPE html>
<head>
        <title>Login</title>
        <meta charset="utf-8" />
        <meta http-equiv="Cache-Control" content="no-store,no-cache,must-revalidate"/>
        <meta http-equiv="Pragma" content="no-cache"/>
        <meta http-equiv="Expires" content="-1"/>
</head>
<body>
    <form method="post" action='<%= response.encodeURL("j_security_check") %>' id="login" >
        <label for="username">Username</label>
        <input type="text" name="j_username" id="username" autofocus />

        <label for="password">Password</label>
        <input type="password" name="j_password" id="password" />

        <button type="submit" class="primary" name="Submit">Log in</button>
    </form>
</body>
</html>

I tried to debug but request is not coming through server to controller. So I'm guessing something is wrong with jboss server. Any help will be appreciated. Thanks


Solution

  • In my case , I added to login page.

    setInterval(function(){
            location.reload(true); //reload each 5 minutes
        },5*60*1000);
    

    Hope this help.