tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jessica Johnson" <>
Subject Re: why is apache serving source for .jsp files?
Date Thu, 24 May 2007 22:22:13 GMT
Thanks Tim, that got me a step further.  I'm no longer getting source
code for the .jsp pages, but now I'm getting a whole lot of HTTP
Status 500 errors.

Here are a few examples:

org.apache.jasper.JasperException: File
"/WEB-INF/jsp2/jsp2-example-taglib.tld" not found

org.apache.jasper.JasperException: The absolute uri: cannot be
resolved in either web.xml or the jar files

/jsp-examples/num/numguess.jsp(24,0) The value for the useBean class
attribute num.NumberGuessBean is invalid.

The first error is especially strange since that file does indeed
exist. C:\Program Files\Apache Software
 I assume that is the location where it would be looking.

In httpd.conf I took out

Include "C:\Program Files\Apache Software

since this file is regenerated every time Tomcat restarts, and it the
config that it generated didn't seem to do a whole lot for me.

Then I added this to the end of httpd.conf
# Config for mod_jk
<IfModule !mod_jk.c>
  LoadModule jk_module "C:/Program Files/Apache Software

JkWorkersFile "C:/Program Files/Apache Software Foundation/Tomcat
JkLogFile "C:/Program Files/Apache Software Foundation/Tomcat

JkLogLevel emerg

JkMount /*.jsp ajp13
JkMount /*/servlet/ ajp13
JkMount /htdocs/jsp-examples/* ajp13

I should mention that I followed these directions in the tutorial to
make Tomcat use Apache's document root:

To Configure Tomcat to use your Apache DocumentRoot instead of it's own:

   1. Open server.xml from C:\Program Files\Apache Software
Foundation\Tomcat 5.5\conf\. Find the <host> tag and edit the
      <Host name="localhost" appBase="C:/Program Files/Apache Software
      unpackWARs="true" autoDeploy="true"
      xmlValidation="false" xmlNamespaceAware="false">
   2. Right after the <host> tag, add the following context:
      <Context path="" docBase="htdocs" reloadable="true" />

And jsp-examples resides here:
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\jsp-examples

Thanks for listening, hopefully someone out there can give me another
nudge in the right direction.


On 5/24/07, Tim Lucia <> wrote:
> I'm dumb for not noticing this early.  The jsp-examples path is not
> JkMount'd nor is there a mapping for *.jsp.  That is your problem.  I
> presumed it was a VirtualHost problem.
> Tim

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message