Am I right to say that "/" refers to the "Tomcat" directory ?

If I mention the file path as "/subscribers.txt", I don't find  the file in
the "TOMCAT" directory once the class is instantiated.

regards,
Rajendra




On 3/1/07, Pid <[EMAIL PROTECTED]> wrote:

Rajendra Sakpal wrote:
> Hi,
>
> I am using TOMCAT 5.5.  I am creating a file in class that is called
from a
> JSP.  However, the relative path that I have specified in the class
doesn't
> seem to work.  The path that I have used is
> :"/webapps/Jonathon/WEB-INF/etc/subscriber.txt".
>
> Can someone please let me know, what is wrong with the relative path ?
>
> thanks in advance,
> Rajendra
>

If you start the path with a "/" then it's not relative.

There are functions to help you locate resources on webapp relative paths.

String absolutePath = servletContext.getRealPath( relativePath );

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to