Jason Novotny wrote:
> 
>     I've stuck a web.xml in my WEB-INF/ directory with the following
> session timeout set:
> 
> <session-config>
>         <session-timeout>
>             5
>         </session-timeout>
>     </session-config>
> 
>     However, I have a session bean with an HttpSessionBindingListener- I
> would think that my valueUnbound() method would get called after 5
> minutes and something printed to the screen, but it doesn't look like
> the session is timing out-
> 
>     Also, how can I query I this value from my web application to
> display how long the user has left?
> 
>     Thanks, Jason
> 

Based upon my limited experience, and having the default setting which
tomcat gives.  I have observed that the sessions are invalidated every
minute, not every second.  And this cycle starts when you start-up the
Tomcat Server.

It does time out, but don't expect it to be timed-out to the nearest
second.  I tried to get a viable explanation on this mailing list, but
it appears no one knows how...;-(

As for displaying how long the user has left...  A simple JSP+Javascript
trick should do the trip...

The JSP will getMaxInactiveInterval() + any time discrepancy with the
Tomcat Start-up time subtract whatever value for latency and send the
value to a Javascript timer and have it displayed on your client's
browser...;-)


Cheers,


John Clark

-- 
     /) John Clark Naldoza y Lopez                           (\
    / )    Software Design Engineer II                       ( \
  _( (_    _  Web-Application Development                    _) )_
 (((\ \>  /_>    Cable Modem Network Management System <_\  </ /)))
 (\\\\ \_/ /         NEC Telecom Software Phils., Inc.  \ \_/ ////)
  \       /                                              \       /
   \    _/  phone: (+63 32) 233-9142 loc. 3112            \_    /
   /   /  cellphone: (+63 919) 241-4612                     \   \
  /   / email: [EMAIL PROTECTED]                        \   \

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to