This will work if you run the class on its own, because without a full
path, it's assumed that it is in the working directory of the invoked
VM, which would be the directory you executed the class. In a webapp,
the working directory is the one that tomcat started up with, which
should be by
application.getRealPath() return web application directory try use this
-Original Message-
From: Chuck Carson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 10:12 AM
To: Tomcat Users List
Subject: ARG! Please Help
I have a class that needs to read in database connection
I think some of your message was chopped, exactly how would I use this?
Thanmks,
CC
-Original Message-
From: Galbayar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 6:26 PM
To: Tomcat Users List
Subject: RE: ARG! Please Help
application.getRealPath() return
%
String webappdir=application.getRealPath();
out.println(webappdir);
String data=webappdir+/database.dat
%
-Original Message-
From: Chuck Carson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 10:25 AM
To: Tomcat Users List
Subject: RE: ARG! Please Help
I think some
Oh okay. That is a good way of doing it, thanks a bunch.
-CC
-Original Message-
From: Galbayar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 6:34 PM
To: Tomcat Users List
Subject: RE: ARG! Please Help
%
String webappdir=application.getRealPath