no one replies me, i am so poor~~~
mei ren hui da, wo hao ke lian T_T
db
"db" <adherent@gmail.com> said:
>I got a problem with Tomcat. I am developping a web service based on
>jsf, and using tomcat as container.
[quoted text clipped - 5 lines]
>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)

Signature
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)
db - 29 Jun 2006 10:36 GMT
what i mean is if i attach a piece of code inside the bean, like
....getRuntime().exec("pwd") to show the current path, the result is
different with start tomcat from eclipse or start it directly.
thanks for replying
db
Juha Laiho - 29 Jun 2006 16:24 GMT
"db" <adherent@gmail.com> said:
>what i mean is if i attach a piece of code inside the bean, like
>....getRuntime().exec("pwd") to show the current path, the result is
>different with start tomcat from eclipse or start it directly.
Yep, in that case you'd be much better off with picking the paths
in the way I described.

Signature
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)