tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig O'Brien" <>
Subject RE: Accessing HTML files in the apache root from servlets
Date Mon, 23 Apr 2001 02:02:49 GMT
If you are ever in doubt, use the complete path to your html file.
(http://www.yourdomain/yourpage.html)  That should always work.  Otherwise
you may have a mapping problem with your mod_jk or ..?  You can access your
graphics like this as well, ... Hell, even put your graphics on a different
server for better performance.....

If your directory is a mess you are only looking for trouble.  It WILL get
worse over time.


-----Original Message-----
From: Iain Lowe []
Sent: Sunday, April 22, 2001 5:52 PM
Subject: RE: Accessing HTML files in the apache root from servlets

You could try

FileReader in = new

or something along those lines.

Hope this helps :)

-----Original Message-----
From: Matthias Hupp []
Sent: Sunday, April 22, 2001 8:45 PM
Subject: Accessing HTML files in the apache root from servlets

Greetings everyone,
I am going mad over this: I have a servlet directory structure in my apache
virtual host document root. Servlets can be reached by typing
"www.../servlet/ServletName. I am trying to access a html file from that
servlet as input data, it could be  just any type of text file. Its name is
passed to the servlet in the URL:
www.../servlet/ServletName?search=inputfile.html. I would like to place that
file somewhere in the apache document root, ideally in the same directory as
the classes.
But tomcat (or the JRE from the Sun JDK, not sure) looks for that file in
the server system root if I do not specify the correct (system) path  -
/usr/local/... - in the URL. First, this path is very very long, and second,
users shouldn't be bothered with the directory structure of my system (it is
really ugly).
BTW, the software versions of the tomcat engine and the JDK are, AFAIR, the
latest respective releases.
So, could anybody tell me how to tell tomcat (or the JRE) to consider the
web-documents directory as their root? Any help is greatly appreciated.

Thx in advance, Matthias

View raw message