Question : Servlet context for resources in Tomcat 5.5

Hi,

I'm using tomcat 5.5.27, and i'm loading some configuration parameters via a standard .ini file into my servlet. the problem i'm having is in wiring up a local context - when i try a System.getProperty("user.dir"), the context appears as a subdirectory of the tomcat installation, ie the bin folder (have tried on a few machines & installs) - but i'd like for it to exist within the directories of the servlet itself. from what i'm reading the context.xml file is defunct now - when i add it, the server tells me it's being ignored. so i'm not sure what i'm missing here? any pointers be very much appreciated!

cheers!

Answer : Servlet context for resources in Tomcat 5.5

We use webapp web.xml for configuration parameters.   I think that's the recommended way to do it.  That also makes it local to your webapp, which would be local to your servlet environment.

I don't know how your system returns the Tomcat /bin directory -- on our installation of Tomcat 5.5.23, user.dir returns the top of the Tomcat directory.  /bin would be a subdirectory under it.

context.xml for a host certainly works for us -- if your catalina output says it is being ignored, it's probably because of a problem in it or an overriding specification somewhere else.
Random Solutions  
 
programming4us programming4us