You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by "Edwards, Jayme" <JC...@software.rockwell.com> on 2001/06/20 14:36:28 UTC

Detecting Session termination from within a service method

Hello again,
 
Currently from within a doGet() handler in a multithreaded Java Servlet running inside Tomcat I am creating several threads and causing the doGet() handler to wait() on notification from those threads to wake up and check some status values (this occurs for each HTTP GET request). I need a way to also check if the user connected to that session is still there, e.g. to see if it is possible to still write to the output stream for a given session. Is there a standard API I can use from within a service method in a Servlet to do this?
 
Thanks,
Jayme Edwards
Rockwell Software

Re: Detecting Session termination from within a service method

Posted by Edson Alves Pereira <Ca...@netscape.net>.
  Hello dude! I think that you can use the object ServletSession or Session in JSP to keep your objects inside the server and use then crossing one by one sessions that you want, to verify if the user is logged you could create an object that stores information about this user and store with setValue( "MyUser", obj ) of ServletSession for example and after use getValue( "MyUser" ) to request that object again in other instance on server.

  I´m hope that this helps!

  With best wishes,
  Edson Alves Pereira
  Brazil
general@jakarta.apache.org wrote:
>
> Hello again,
>  
> Currently from within a doGet() handler in a multithreaded Java Servlet running inside Tomcat I am creating several threads and causing the doGet() handler to wait() on notification from those threads to wake up and check some status values (this occurs for each HTTP GET request). I need a way to also check if the user connected to that session is still there, e.g. to see if it is possible to still write to the output stream for a given session. Is there a standard API I can use from within a service method in a Servlet to do this?
>  
> Thanks,
> Jayme Edwards
> Rockwell Software
> 
--
<div style="color: 'lemon'
            background-color:'green'
            font-family: 'Arial'">
<p>Edson Alves Pereira
</div>
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org