0 Replies Latest reply on Jan 26, 2007 6:08 PM by K Hundley

    j_security_check and session timeout issue

    K Hundley Newbie

      I've seen a lot of postings in regards to j_security_check problems but they all seem to be related to calling the login page directly. I am having an issue related to j_security_check after a session timeout occurs. Any help would be appreciated!
      Environment - jboss 4.0.4 GA, Seam 1.0.1 GA, ebj3, facelets

      A user logs into application then logs out and leaves the browser open. If they log back in after a session timeout the error: HTTP Status 400 - Invalid direct reference to form login page is displayed. However, if the user does a refresh on the browser after a session timeout then logs in - the error doesn't occur. The login form is not directly called anywhere in the application. When a user accesses MainPage and is not logged in they are redirected to the Login.jsp. Code snippets listed below. Any ideas why MainPage is not redirecting to Login.jsp after a session timeout occurs?

      web.xml snippet
      faces-config.xml snippet
       <redirect />
      <form name="loginForm" action="j_security_check" method="post">
       <th colspan="2"><div class="dragbar">Login</div></th>
       <td class="label">User Name:</td>
       <td><input type="text" id="j_username" name="j_username" tabindex="1"></td>
       <td class="label">Password:</td>
       <td><input type="password" name="j_password" tabindex="3"> <input type="submit" value="Login"></td>
      import javax.annotation.security.PermitAll;
      import javax.ejb.Stateless;
      import org.jboss.seam.Seam;
      import org.jboss.seam.annotations.Name;
      public class LogoutAction implements Logout {
       public String logout() {
       try {
       } catch (Exception e) {}
       return "home";