1 Reply Latest reply on Oct 14, 2002 7:57 PM by berkgypsy

    Stop return to previous page after Authenicated session time

    kplex

      Hi I have a problem with jboss-3.0.1_tomcat-4.0.4.

      I have a number of pages that are built up with data obtained from a database, if I leave a user logged in on one of these pages until the Authentication session times out he will be returned to the login page.

      When the user logs in again, instead of going to the main page he will be sent back to the page he came from, which causes Null pointer exceptions to be thrown as he tries to access resources that are no longer allocated..

      Is there any way of control which page JAAS send the user to after the a login page, regardless of how they got to the login page in the first place.

      Sorry if this is a bit confused as I am still learning..
      Thanks a million,
      John

      ps I am using the DatabaseServerLoginModule authentication

        • 1. Re: Stop return to previous page after Authenicated session
          berkgypsy

          In my login.jsp, I take the following actions:

          check the session for a "beenForwarded" flag
          if it is found, immediately remove it
          if the flag is set to true:
          -display the rest of the login page
          else:
          -add a flag to the session called "beenForwarded" and set it to true
          -call response.sendRedirect(put a restricted page here)

          This takes care of the problem of not being able to post directly to your login page (for instance if the user bookmarks it). It also allows you to set the page that newly authenticated users should be directed to.

          I've posted the code in another thread called j_security_check but it's taking its time to show up.

          Hope this helps,
          Emily