A
Andy Fish
Hi,
I have recently had a problem with servlet initialisation and I figured out
that on startup, tomcat was deserialising instances of my classes that were
held in session variables when it was shut down the previous time.
Tomcat does this before initialising the servlet. Unfortunately the class in
question cannot sensibly be initialised without knowing the servlet
configuration parameters, and I can't get hold of them until the servlet is
initialised.
I seem to be in a catch 22 here. I don't want to hard code knowledge in my
class about where the servlet configuration will be, but I can't initialise
the class without it, and I can't stop tomcat deserializing the objects.
any clues anyone?
Andy
I have recently had a problem with servlet initialisation and I figured out
that on startup, tomcat was deserialising instances of my classes that were
held in session variables when it was shut down the previous time.
Tomcat does this before initialising the servlet. Unfortunately the class in
question cannot sensibly be initialised without knowing the servlet
configuration parameters, and I can't get hold of them until the servlet is
initialised.
I seem to be in a catch 22 here. I don't want to hard code knowledge in my
class about where the servlet configuration will be, but I can't initialise
the class without it, and I can't stop tomcat deserializing the objects.
any clues anyone?
Andy