1 Reply Latest reply on Sep 29, 2008 12:00 PM by danielc.roth

    Semi-auto-login

    nickarls

      Is there any way of performing a semi-auto-login with data from a POST?


      I have the requirement of a portal doing a very crude autologin by posting autologin_user and autologin_password against my login page. I've defined them as page parameters and I have a page action that would attempt a login if the incoming params are non-null.


      The problem, however is that i get a


      java.lang.IllegalStateException: getLastAccessedTime: Session already invalidated
           at org.apache.catalina.session.StandardSession.getLastAccessedTime(StandardSession.java:439)
           at org.apache.catalina.session.StandardSessionFacade.getLastAccessedTime(StandardSessionFacade.java:84)
           at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:219)
           at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:213)
           at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifySessionInitialized(SessionDispatcher.java:106)
           at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifyIfNew(SessionDispatcher.java:63)
           at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:52)
           at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
           at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
           at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



      Is there some way of post-jumping straight into a Seam application? Or is there any other way of doing this kind of functionality.


      Yep. I know that posting that stuff in the first place is not that-a-good idea but its intra-stuff and the customer wants it, so...

        • 1. Re: Semi-auto-login

          Maybe an outer filter that detects this specific post, saves the stuff away somewhere for later (querystring, requestmap or some context) and then redirects to a page where you may do the login as usual :-)