tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Guo <>
Subject Re: Configure the location of a file to be opened by a java application in Tomcat
Date Wed, 26 Feb 2003 19:26:02 GMT

I think you can use context.getRealPath("/") to get root folder of current webapp, then append
your filename/relative path to this path. Never tried, but think it works.
 "C. L. Chen" <> wrote:Hi,

I am trying to create a jsp which invokes a Java application connecting to
a database using JDBC. That Java application requires reading data from a
text file which contains information about the JDBC driver, user name and
password. The problem is I don't know how to direct Tomcat so that it can
find the text file needed by the JDBC connection. Does anyone know how to
configure Tomcat so that it will find the text file?

C. L. Chen

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more

To unsubscribe, e-mail:
For additional commands, e-mail:

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message