Hi,
Why dont you check for a particular attribute you have added to the
session in your interceptor.
eg:- when a user login you add the attribute logedin to true.
session.setAttribute("logedin","true");
and in the incerceptor you check if its there or null, if its not
there or null that means the session has expired.
Thanks,
Nuwan
(http://code.google.com/p/struts2-ssl-plugin/)
jignesh.patel wrote:
Hi,
I am having struts2 application with hibernate + mysql.I want to create
web app session Expired page,but i am not able to detect weather my
application session expired or not.
I have given session time out to 1 min also but it still displays active
session.
<session-config>
<session-timeout>1</session-timeout>
</session-config>
My SessionChecking interceptor looks like:-
public class SessionExpired implements Interceptor {
public void destroy() {
LOG.info("..............destroy");
}
public void init() {
LOG.info("..............init");
}
public String intercept(ActionInvocation actionInvocation) throws
Exception {
Map session = actionInvocation.getInvocationContext().getSession();
if(session == null) {
LOG.info("..............interce if");
}
else {
LOG.info("..............interce else");
}
return actionInvocation.invoke();
}
}
After 1..2...3...5 min it still logging ("..............interce else").
Do anyone know how can i detect my application session time out or not ?
Thanks & regards
jignesh
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]