You can get the URL for any class from its ClassLoader. So, I don't know what you mean by the "current" path, but this functionality provides a lot of tricks.

-micael


At 06:00 AM 12/9/2002, you wrote:
I've just been looking at the URL package, but I can't see how that is going
to get around the directory problem?  I need the host to be transparent to
the servlet and the files to be always found from the web app location.  If
I start putting urls in, I will start to tie myself to specific locations.

Is there a way of getting the current URL path from the server without
writing it in explisitly.

Cheers

Simon

PS
Excuse the spelling, I've been at the for days now and I'm getting a little
tierd. ;-)

----- Original Message -----
From: "Laxmikanth M.S." <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 12:55 PM
Subject: RE: File structure in webapps for tomcat.


> use class URI in java.net.* package.....
> no need to set in server.xml
>
> Regards
> Laxmikanth M S
> Off*  : 91-80-6610330 extn 1256
> Res* : 91-80-5267150
> http://www.sonata-software.com
>
> > Coming together is the beginning, staying together is progress and
working
> > together is Success
> What lies behind us and what lies before us are tiny matters compared to
> what lies within us  - Emerson
>
>
> > -----Original Message-----
> > From: Simon Kelly [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, December 09, 2002 5:23 PM
> > To: Tomcat Users List
> > Subject: File structure in webapps for tomcat.
> >
> > Hi,
> >
> > I am trying to get my servlet to write to and read from files within my
> > webapp structure.  However, when the servlet runs it seems that the
> > working
> > directory during its lifecycle is c:\xxx\tomcat 4.1.  Is there any way,
in
> > web.xml, to force the servlet to run in it's own app directory
structure?
> >
> > Regards
> >
> > Simon

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Micael

-------------------------------------------------------

This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to