Redirect to custom page on session time out


At the moment the MWS login page is shown when a MWS session is timed out.

In my application I want to redirect to a custom page when a session timeout occurs. How do I achieve this? Do I need a custom login/logout portlet or are there any session timeout listener, which I can use?


I would imagine this would be something above MWS specifically and more related to servlet/session based i.e.

getLastAccessedTime. This returns the time, in milliseconds since the epoch, at which the session was last sent from the client.

getMaxInactiveInterval. This returns the amount of time, in seconds, that a session should go without access before being automatically invalidated. A negative value indicates that the session should never timeout


Thanks for your answer.

Now my solution looks like this:

  • I keep track of the usage of my session in the session itself.
  • In the overridden beforeInvokeApplication method of a Base-PageBean I check if the session is valid, if not, i redirect to an error pageā€¦

Maybe another solution could have been the use of Servlet filters.