tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koningshoed" <>
Subject RE: which is the current directory for Tomcat Server?
Date Mon, 04 Feb 2002 22:45:28 GMT
There is a directory called work (jakarta-tomcat-4.0.1/work) under which a
directory gets created for each context - where the servlets get run.
Excactly how it works from there I'm not sure but you should be able to get
to your file by using absolute addresses.  Or perhaps by using a relative
address of the form "../../webapps/yourappname/WEB-INF/classes/filename",
but I'm not too sure.
You could possibly find the location by making the servlet create a file
called something like and then issuing "find / -name".
Thanks  for  the  fast  reply.  What  I  want  is to  read a  text  file
from  servlet  or  jsp page. I  don 't  want  to  specify the  whole
directory  path for  the  file. I  want  to  just  specify  the  file  name
and  should  be  able  to read that  file. So I  believe  if I  keep  in the
current working  directory  of  the Tomcat server, it  will  work. IS the
WEB root as  same as the  Current  working  directory  for  the  Tomcat


-----Original Message-----
From: Atok Koenig []
Sent: Thursday, January 31, 2002 3:54 PM
To: Tomcat Users List
Subject: Re: which is the current directory for Tomcat Server?

Do you mean the web root?

If so that is <install path>\jakarta-tomcat-3.2.2\webapps\ROOT

Youcan change this or add additional virtual roots in the \config\server.xml
file using the context tags

-----Original Message-----
From: "Santosh Varghese" <>
Date: Thu, 31 Jan 2002 14:37:21 -0800
To: "Tomcat Users List" <>
Subject: which  is the  current  directory for Tomcat Server?

> Hi,
>     I  wanted  to  read  some txt  file  from  the  current directory  for
> tomcat  server. But  I  am  unable  to  find  out  the  current
> Please help me  out
> Regards,
> Santosh

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message