Hello, We've implemented a similar solution for that, which consists on opening a modal dialog in the browser asking for user password again, thus extending session duration if he correctly enters it, one minute before the user session expires. We've used regular javascript setInterval to accomplish it, so that it opens a dialog if a user is inactive for this period of time... It worked very well...
Yours, Marcus Milanez -----Mensagem original----- De: mfs [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 24 de abril de 2008 15:47 Para: users@tomcat.apache.org Assunto: Re: custom timeout/expiry implementation Actually, i need a mean by which i can extend the session (in some cases) if the session is about to expire. I know i can certainly do this with Session.setMaxTimeInternal() but thats only possible with some client event (i.e. when the servlet/filter is invoked), which doesn't satisfy my needs. Something like HttpSessionListener.preSessionDestroyed() is what i need..I wonder why cant they give such control.. Christopher Schultz-2 wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Farhan, > > mfs wrote: > | Actually i need to provide my own session timeOut/expiry > implementation and > | i was wondering what would be the easiest way to achieve this, i am > using > | tomcat for development but oc4j for production, and i was wondering > | if somehow i can hook in my implementation into various servlet > containers.. > > You could use a Filter to check whatever condition should expire > sessions. The Filter can certainly call HttpSession.invalidate() at > any time. > > Filters are (usually) cross-container because they only have access to > standard Servlet-API stuff. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkgOQ2gACgkQ9CaO5/Lv0PAAKACgwmdE9sTrDP/a1V4WdaYfVN8V > N+cAnA+Q784oRGuFiBmHbfHNjLlt/GWS > =bLPb > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, > e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/custom-timeout-expiry-implementation-tp16825415p16 851515.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]