You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Carlos <Ca...@pbsinet.com> on 2004/10/14 15:43:28 UTC
Servlet caching?
Do servlets in Tomcat (1.4) catch results of programs that they run? I have
a java servlet that lists the print services of printers installed in the
server (Linux Red Hat). I run the servlet before and after I install a
couple of printers in the server; however, the list of printer services does
not change until I restart Tomcat. At the same time, I run a test program
in the server from the command line to list the print services and this
program lists the newly installed printers right away. This has led me to
believe that the servlet is caching the list of printer services when it is
run the first time and does not re-run the code until Tomcat has been
re-started.
Thanks in advance for your response.
Re: Servlet caching?
Posted by QM <qm...@brandxdev.net>.
On Thu, Oct 14, 2004 at 04:20:08PM -0400, Carlos Oliva wrote:
: I have found that even if I terminate every connection of the servlet to the
: database and reload the servlet, the servlet still does not find the newly
: installed printer.
Please post the servlet, or provide a walk-through.
It really sounds like you're storing data somewhere (instance variable,
whatever) but not properly updating it second time around.
-QM
--
software -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Servlet caching?
Posted by Carlos Oliva <ca...@pbsinet.com>.
Hi Tim,
I have found that even if I terminate every connection of the servlet to the
database and reload the servlet, the servlet still does not find the newly
installed printer. I would think that after reloading the servlet all the
classes that it had used would cease to exist. That is, any class that had
been instantiated or used by the servlet would not remain instantiated after
I reload the servlet.
So I am thinking that re-starting tomcat somehow makes Tomcat aware of the
services that have been installed after Tomcat was started
-----Original Message-----
From: Tim Funk [mailto:funkman@joedog.org]
Sent: Thursday, October 14, 2004 9:50 AM
To: Tomcat Users List
Subject: Re: Servlet caching?
It sounds like one of the classes the Servlet is depending on is caching the
result.
-Tim
Carlos wrote:
> Do servlets in Tomcat (1.4) catch results of programs that they run? I
have
> a java servlet that lists the print services of printers installed in the
> server (Linux Red Hat). I run the servlet before and after I install a
> couple of printers in the server; however, the list of printer services
does
> not change until I restart Tomcat. At the same time, I run a test program
> in the server from the command line to list the print services and this
> program lists the newly installed printers right away. This has led me to
> believe that the servlet is caching the list of printer services when it
is
> run the first time and does not re-run the code until Tomcat has been
> re-started.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Servlet caching?
Posted by Tim Funk <fu...@joedog.org>.
It sounds like one of the classes the Servlet is depending on is caching the
result.
-Tim
Carlos wrote:
> Do servlets in Tomcat (1.4) catch results of programs that they run? I have
> a java servlet that lists the print services of printers installed in the
> server (Linux Red Hat). I run the servlet before and after I install a
> couple of printers in the server; however, the list of printer services does
> not change until I restart Tomcat. At the same time, I run a test program
> in the server from the command line to list the print services and this
> program lists the newly installed printers right away. This has led me to
> believe that the servlet is caching the list of printer services when it is
> run the first time and does not re-run the code until Tomcat has been
> re-started.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org