tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Rhines" <jrhi...@email.com>
Subject RE: servlet question !!
Date Thu, 08 Jun 2000 13:58:17 GMT
Will the servlet persist for at least as long as the most recent session
which used it?

-----Original Message-----
From: Arion [mailto:arion@talentinfo.com.hk]
Sent: Thursday, June 08, 2000 3:34 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: servlet question !!


Hi!

The answer should be 'undeterministic'.

Servlet are created and initialize once and repeated use of it employ
the SAME instance. However, the servlet engine may choose to unload some
of the servlets whenever she thinks appropriate (maybe the servlet has
not been used for a long time and the memory is running out).

Arion.

Manpreet wrote:

> HI all, I have a small servlet code like this: import java.io.*;import
> javax.servlet.*;import java.servlet.http/*; public class Test extends
> HttpServlet {        int count=0;        public void
> doGet(HttpServletRequest req , HttpServletResponse res) throws
> IOException , ServletException {            PrintWriter
> out=res.getWriter();            out.write(count++);        }} Is it
> possible that each request to this servlet gets the initial value of
> count i.e. 0 thanks in advance ,Manpreet Singh.


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org




Mime
View raw message