tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Westling <hwestl...@stc.com.sa>
Subject Servlet's constructor called at every request !
Date Sun, 28 Oct 2001 07:12:54 GMT
Hi all,

I would ask you all to go back in time with me, to the JServ era. We are
using a 3rd party software package that is based on Apache 1.3.12  and JServ
1.1.2 (running on Solaris). Now I have some problems with it and I hope
someone can help me. Please don't tell me to upgrade to Tomcat 4.0. I know
it's a superior product but I'm stuck with JServ for now.

The problem I'm having is that I would to initialise a logging object
(log4j) in my servlet. The init() method of the servlet would be great for
that, but it didn't work. Whatever I did, my init() wouldn't get called. I
checked and double checked the method's signature, searched mailing archives
and groups.google.com, but I didn't find anything usefull. 

Then I decided the use the constructor of the servlet to do the
initialisation. Now I have the opposite problem. The constructor get called
at _every_ request. So it seems my servlet gets recreated at every request.
I don't think this is the way it is supposed to work.

Can someone please tell me what I'm doing wrong or at least point in me in
the right direction ? I will post configuration details on request.

Thanks,
Marcel


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message