You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by dgv <de...@gmail.com> on 2013/04/16 20:02:52 UTC

Re: Custom message on session timeout

did you solve for this? I am looking for a similar solution too.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Custom-message-on-session-timeout-tp6834760p7578590.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Custom message on session timeout

Posted by dgv <de...@gmail.com>.
we want to display a custom message on the front end. As soon as the timeout
mentioned in the web.xml is hit, the session expired (not sure how to
intercept at this point) and so setting a message is not possible. Unless
there are other ways.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Custom-message-on-session-timeout-tp6834760p7578664.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Custom message on session timeout

Posted by Chin Huang <pu...@gmail.com>.
You can check if the session timed out without any Shiro specific code.

Call HttpServletRequest#getRequestedSessionId() to check if the
browser sent a session ID, and call
HttpServletRequest#isRequestedSessionIdValid() to check if the session
ID the browser sent is valid.

    if (request.getRequestedSessionId() != null
     && !request.isRequestedSessionIdValid())
    {
        // The session timed out.
    }

On Tue, Apr 16, 2013 at 11:02 AM, dgv <de...@gmail.com> wrote:
> did you solve for this? I am looking for a similar solution too.
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Custom-message-on-session-timeout-tp6834760p7578590.html
> Sent from the Shiro User mailing list archive at Nabble.com.