Re: Struts2 sesionExpired page
SessionListen when ever i put this code in my web.xml file it give error like init: deps-module-jar: deps-ear-jar: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: compile: compile-jsps: Incrementally deploying http://localhost:8084/WWAtlas Completed incremental distribution of http://localhost:8084/WWAtlas Incrementally redeploying http://localhost:8084/WWAtlas Start is in progress… start?path=/WWAtlas FAIL – Application at context path /WWAtlas could not be started G:\Dhiren\workspace\WWAtlas\nbproject\build-impl.xml:706: The module has not been deployed. BUILD FAILED (total time: 3 seconds) when i removethis its work fie pleas any one can give me solutin for that..its very helpful for me. -- View this message in context: http://struts.1045723.n5.nabble.com/Struts2-sesionExpired-page-tp3475124p5130531.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 sesionExpired page
Are you deploying to Tomcat? Glassfish? What version are you running? Can you post your listener.../listener fragment here? jb / On Mon, Jan 9, 2012 at 12:00 AM, dhiren solankidhiren2...@rediffmail.comwrote: SessionListen when ever i put this code in my web.xml file it give error like init: deps-module-jar: deps-ear-jar: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: compile: compile-jsps: Incrementally deploying http://localhost:8084/WWAtlas Completed incremental distribution of http://localhost:8084/WWAtlas Incrementally redeploying http://localhost:8084/WWAtlas Start is in progress… start?path=/WWAtlas FAIL – Application at context path /WWAtlas could not be started G:\Dhiren\workspace\WWAtlas\nbproject\build-impl.xml:706: The module has not been deployed. BUILD FAILED (total time: 3 seconds) when i removethis its work fie pleas any one can give me solutin for that..its very helpful for me. -- View this message in context: http://struts.1045723.n5.nabble.com/Struts2-sesionExpired-page-tp3475124p5130531.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Best, Jeffrey Black 512-537-9871 jeffrey.bl...@yahoo.com -- Connect with me on LinkedIn: http://www.linkedin.com/in/jeffreyblack Follow me on Twitter: http://twitter.com/jeffblack360 Check out my blog: http://jeffblack360.wordpress.com
Re: Struts2 sesionExpired page
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-timeout1/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]
Re: Struts2 sesionExpired page
Hi, I recommend to you should see *SessionInactivityFilter *on* * http://javawebparts.sourceforge.net/ page for page rejection and forwarding for session inactivity. However you must see to *HttpSessionListener *for created and destroyed sessions. Sample SessionCaptor: /* * */ public class SessionCaptor implements HttpSessionListener { private static int activeSessions = 0; public SessionCaptor() { } public void sessionCreated(HttpSessionEvent se){ HttpSession session = se.getSession( ); session.setMaxInactiveInterval(30 * 60); activeSessions++; System.out.println(Session: + (new Date( )).toString() + ID: + session.getId( ) + - Active sessions: + activeSessions); } public void sessionDestroyed(HttpSessionEvent se){ HttpSession session = se.getSession( ); if(activeSessions 0) activeSessions--; System.out.println(Session Closed: + (new Date( )).toString() + ID: + session.getId() + - Active sessions: + activeSessions); session.invalidate(); } public static int getActiveSessions() { return activeSessions; } } in *web.xml * listener listener-class package.SessionCaptor /listener-class /listener * *Regards. Okan. * *On Feb 7, 2008 8:50 AM, jignesh.patel [EMAIL PROTECTED] 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-timeout1/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 -- View this message in context: http://www.nabble.com/Struts2-sesionExpired-page-tp15328299p15328299.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 sesionExpired page
In addition to the other suggestions posted you can also call the request's isValidSessionId() method (or something like that). Dave --- jignesh.patel [EMAIL PROTECTED] 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-timeout1/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 -- View this message in context: http://www.nabble.com/Struts2-sesionExpired-page-tp15328299p15328299.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]