tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Fwd: Help, only viewing source of my index.jsp page - Apache 2.0.48 Tomcat 4.1.29 mod_jk_1.2.5_2.0.47.dll
Date Mon, 22 Dec 2003 14:46:22 GMT

> My problem is that when I enter the source from my
> index.jsp is displayed.

This is almost always a misconfiguration of JkMount directives.

> It appears that the virtualhost setup in my
> http.conf is finding the mysite directory in Tomcat, but for some
> reason cannot display the index page as it should. I have index.jsp
> setup in my web.xml as my welcome page.
 > <VirtualHost>
 > ServerName
 > # Static files
 > 	DocumentRoot D:/java/Tomcat41/webapps/mysite
 > 	Alias /mscarloans "D:/java/Tomcat41/webapps/mysite"
 > 	JkMount /mscarloans/*.jsp  ajp13

This line maps all JSP files in the /mscarloans/ tree to be sent to 
Tomcat for processing. There doesn't appear to be any other JkMount for 
this VirtualHost. I think you want thic changed to something like:

JkMount /*.jsp ajp13

 >     <Location "/mysite/WEB-INF/*">
 >         AllowOverride None
 >         deny from all
 >     </Location>

Good call! Lots of people forget about this!

 >      <Directory "D:/java/Tomcat41/webapps/mysite/WEB-INF/">
 >         AllowOverride None
 >         deny from all
 >      </Directory>

You should generally do the <Directory> one. That makes it so that, no 
matter what strange location and URL games are played, any request that 
ultimately points to files in this directory are denied. With the 
<Directory> config, you don't even need the <Location> config.

Hope that helps,

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

View raw message