tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajendra Sakpal" <rajendrasakpal.mailingl...@gmail.com>
Subject Re: Specifying relative path for TOMCAT 5.5 ?
Date Thu, 01 Mar 2007 10:13:56 GMT
Hi Peter,

Thanks for your reply. Here are few more things in the context of the
relative path:

1.> I am gathering that "/" refers to the drive where my Tomcat is installed
on Windows.  (With file path as "/subscribers.txt" the file is created at
the root of the drive.)

2.> I am not using HTTP sessions.

regards,
Rajendra


On 3/1/07, Rajendra Sakpal <rajendrasakpal.mailinglist@gmail.com> wrote:
>
>
>
>
>
>
> On 3/1/07, Pid <p@pidster.com> 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: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message