tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janek Bogucki <jane...@yahoo.co.uk>
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
portable.

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

HTH,
Janek Bogucki

 --- Jacob Vennevald Madsen <jvm@gopinocchio.com>
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
> www.gopinocchio.com
> +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 @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

Mime
View raw message