Re: path problem in tomcat



"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)
.



Relevant Pages

  • path problem in tomcat
    ... I got a problem with Tomcat. ... and using tomcat as container. ... My problem is if i start Tomcat in Eclipse, the default root path is ... And i need to debug the code under eclipse. ...
    (comp.lang.java.programmer)
  • Re: [ant] "build-Design"
    ... Wenn Eclipse P compiliert, weiss Eclipse zwar, ... der Eclipse-spezifischen Builddatei die normale Builddatei aufrufe. ... Wie führst Du sinnvoll UnitTests auf dem Tomcat aus? ... JPDA = Java Platform Debugger Architecture ...
    (de.comp.lang.java)
  • Re: servlet project setup in Eclipse
    ... The way I set up Eclipse for web application projects is this. ... configure WEB-INF/src as a source folder for the project, ... See the Tomcat ... there isn't supposed to be a servlet directory underneath webapps. ...
    (comp.lang.java.help)
  • Re: Limiting Disck Cache
    ... What else are you running besides Tomcat and Eclipse? ... RAM and what goes in swap sees this brand new file being used ... that one file takes up all of cache. ...
    (Debian-User)
  • Re: My java changes not reflecting on server due to dependency
    ... I am mainly working on turboLister, but I have some changes to be made ... I have build automatically enabled in my eclipse, ... but not those i made in the biz project. ... The second is partly an Eclipse question because you're using the Eclipse-managed Tomcat instance, but the larger question is all Tomcat. ...
    (comp.lang.java.programmer)