Re: path problem in tomcat
- From: Juha Laiho <Juha.Laiho@xxxxxx>
- Date: Wed, 28 Jun 2006 19:29:03 +0000 (UTC)
"db" <adherent@xxxxxxxxx> said:
I got a problem with Tomcat. I am developping a web service based on
jsf, and using tomcat as container.
My problem is if i start Tomcat in Eclipse, the default root path is
D:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\myproject
however if i start tomcat through tomcat configuration directly, the
default root path changed to D:\Programme\Apache Software
Foundation\Tomcat 5.5\
Please clarify what you mean by "default root path"? Just "current
directory"/"default directory", or something else?
If you just mean that the default directory changes, then I have an
easy answer: don't use the default directory for anything.
Since in my program there are files are written and read, the path is
important. And i need to debug the code under eclipse. I can not change
the pathes each time when i switched back to eclipse.
I think you could use ServletContext.getRealPath() to properly handle
different directory layouts; see:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.
- Follow-Ups:
- Re: path problem in tomcat
- From: db
- Re: path problem in tomcat
- References:
- path problem in tomcat
- From: db
- path problem in tomcat
- Prev by Date: request parameter cleared before first filter called in tomcat 5.0.25
- Next by Date: Re: Java MS Excel read write question
- Previous by thread: Re: path problem in tomcat
- Next by thread: Re: path problem in tomcat
- Index(es):
Relevant Pages
|