tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <>
Subject RE: JkMount only *jsp but include index.jsp?
Date Wed, 06 Nov 2002 17:49:08 GMT

Check out the welcome-file option in web.xml.  Set that to index.jsp and you
should be OK.

If you need Apache to understand that "/" = "index.jsp" you'll need to do
something like set DirectoryIndex in your virtual host container in
httpd.conf, and if that doesn't work, you'll need to either get the
sledgehammer out and use mod_rewrite, or just stick a file called index.html
in the same directory as index.jsp, and have index.html contain a
zero-second META refresh to index.jsp.  You could also write a filter that
would look at every request and trap requests without a filename and do a
redirect to index.jsp.

Lots of options, it pretty much depends on what you are comfortable doing,
and how much work you want to devote to doing it.  My preference is to use
the index.html refresh personal rule is to stick an index.html
file into _every_ directory reachable by Apache that does a refresh back to
the main page.  Stops prowlers.


> -----Original Message-----
> From: Oliver Meyn []
> Sent: Wednesday, November 06, 2002 12:17 PM
> Subject: JkMount only *jsp but include index.jsp?
> Hi all,
> Running Apache 2 and Tomcat 4.0.4 integrated with Jk on RH 
> 7.3, I would like
> my virtual hosts to display the index.jsp file instead of the 
> dir listing,
> but only send *jsp to tomcat, so that other files (most 
> notably a phpBB) are
> handled normally under apache.  In httpd.conf my (snipped) 
> virtual host
> looks like this:
> DirectoryIndex index.jsp index.php index.html
> JkMount /*jsp ajp13
> which allows everything to work except when looking into 
> directories eg
> which produces a dir listing instead of 
> the rendered
> index.jsp.
> If I change the virtual host listing to:
> DirectoryIndex index.jsp index.php index.html
> JkMount /* ajp13
> then I get index.jsp for my directory instead of a contents 
> listing (good),
> but then everything is getting passed to tomcat and it 
> doesn't understand
> php (bad).
> All help appreciated, and TIA,
> Oliver
> ********************
> Oliver Meyn
> "Things should be made as simple as possible, but no 
> simpler." - Albert
> Einstein
> --
> To unsubscribe, e-mail:   
For additional commands, e-mail:

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

View raw message