how can I put jsp files with html files

J

Justin Mencl

I have a RH9 machine running Apache2 and Tomcat 4 with mod_jk.so as a
connector. The configuration is running perfectly except for one
little nuisance. Apache is serving from /var/www/html and Tomcat is
serving from /usr/local/tomcat/webapps/'app'/. The connection between
works great for servlets. And the connection works for JSP pages when
the JSP pages are in the Tomcat directory. I would like to have the
JSP pages located with the rest of the HTML files at /var/www/html.

Is there a way to get JSP files in /var/www/html to be served through
Apache to Tomcat? Is there a classBase Context param in Tomcats
server.xml I can use?

Please post to list so everyone may benefit.

TIA.

justin mencl
 
S

Sudsy

Justin said:
I have a RH9 machine running Apache2 and Tomcat 4 with mod_jk.so as a
connector. The configuration is running perfectly except for one
little nuisance. Apache is serving from /var/www/html and Tomcat is
serving from /usr/local/tomcat/webapps/'app'/. The connection between
works great for servlets. And the connection works for JSP pages when
the JSP pages are in the Tomcat directory. I would like to have the
JSP pages located with the rest of the HTML files at /var/www/html.

Is there a way to get JSP files in /var/www/html to be served through
Apache to Tomcat? Is there a classBase Context param in Tomcats
server.xml I can use?

This is handled automagically. My mod_jk.conf file is included in the
Apache httpd.conf file and forwards all .jsp and .do requests to
Tomcat. It's a fairly standard configuration, BTW.
 
J

Justin Mencl

Sudsy said:
This is handled automagically. My mod_jk.conf file is included in the
Apache httpd.conf file and forwards all .jsp and .do requests to
Tomcat. It's a fairly standard configuration, BTW.

Thanks for the repsponse.

Yes, my apache config will pass JSP requests to Tomcat, but Tomcat
will only look in the webapps/ directories for the requests. It will
not look outside to other directories. My question still stands, but
rephrased:

Is there a way to get Tomcat to server JSP pages located outside the
webapps/ directory?

Again, TIA

Justin Mencl
 
S

Sudsy

Justin Mencl wrote:
Is there a way to get Tomcat to server JSP pages located outside the
webapps/ directory?

Here's an extract from my apps-localhost.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>
<Host name="www.bostonmanor.ca" appBase="/u/website/bostonmanor">
<Context path="" docBase="/u/website/bostonmanor"/>
</Host>
</Server>

The Context element is the key. Look it up in the documentation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top