tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janek Bogucki <>
Subject Re: Configuration
Date Fri, 12 Oct 2001 12:17:44 GMT
Hi Jacob,

Can you put your servlet configuration in the normal
servlet configuration data, web.xml? If so the web
container will load the data for you and you can
access the data via ServletConfig.getInitParameter ().

Alternatively you could try writing a file and find
where it is created. It's likely to be the directory
the JVM was started in. This behaviour may not be

Also have a look at ServletContext.getRealPath ()
which returns a filesystem path from a context
relative path.

Janek Bogucki

 --- Jacob Vennevald Madsen <>
wrote: > Hi List
> Is there a directory of tomcat that is allways
> looked in for files
> loaded by Servlets?
> I have a config file wich I want to be able to fetch
> in my Servlets just
> by giving the filename and not the entire path.
> I tried the work/localhost/<app-name>/ directory but
> it didn't work.
> Any ideas?
> Jacob Vennervald Madsen
> Mobile System Developer
> GoPinocchio
> Norrebrogade 45
> DK-2200 Copenhagen
> +45 26750106
> This email and any files transmitted with it are
> confidential and
> intended solely for the use of the individual or
> entity to whom they
> are addressed. If you have received this email in
> error please notify
> the system manager.

Do You Yahoo!?
Get your free address at
or your free address at

View raw message