Hi Tõnu,

Thank you for your reply. I still haven't been able to get things working, 
but I'm getting closer to understanding how it all works. The documentation 
doesn't seem to talk much about web.xml, but I get the impression that 
$TOMCAT_HOME/conf/web.xml isn't just a sample. Is this file read in 
addition to context specific WEB-INF/web.xml files?

In addition to adding the below mapping of *.html to the jsp servlet (in 
the conf/web.xml file and the myapp/WEB-INF/web.xml file when that didn't 
work) I commented out the mapping of *.jsp to the jsp servlet. Oddly 
enough, index.jsp still works like a dream, and index.html still doesn't.

I also read the following in the Servlet Specification:

"If the container has an internal JSP container (whatever that means), the 
*.jsp extension is implicitly mapped to it so that JSP pages may be 
executed on demand. If the web application defines a *.jsp mapping, its 
mapping takes precedence over this implicit mapping."

I presume this is why index.jsp still worked with the mapping removed, but 
it doesn't shed much light on the index.html.

Any other clues???

Stuart



At 09:21 17/04/2001 +0200, you wrote:
>Hi,
>
>You need to specify that the jsp servlet should process the .html files.
>Try to add something like this into web.xml file:
>
>     <servlet>
>         <servlet-name>
>             jsp
>         </servlet-name>
>         <servlet-class>
>             org.apache.jasper.runtime.JspServlet
>         </servlet-class>
>         <load-on-startup>
>             -2147483646
>         </load-on-startup>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>
>             jsp
>         </servlet-name>
>         <url-pattern>
>             *.html
>         </url-pattern>
>     </servlet-mapping>
>
>Look at the example web.xml file in $TOMCAT_HOME/conf directory.
>
>Regards,
>Tõnu
>
> > -----Original Message-----
> > From: Stuart Allen [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 17, 2001 8:53 AM
> > To: [EMAIL PROTECTED]
> > Subject: Trouble getting Tomcat to parse .html files of JSP tags.
> >
> >
> > I have been trying for some time now to configure Tomcat/
> > Apache to allow
> > the inclusion of JSP tags in .html files. In my tomcat-apache
> > file, that is
> > included at the bottom of http.conf, I have the following lines:
> >
> > JkMount /mydev/*.html ajp12
> > JkMount /mydev/*.jsp ajp12
> > JkMount /mydev/servlet/* ajp12
> >
> > I have two files, index.jsp and index.html in
> > $TOMCAT_HOME/webapps/mydev.
> > They contain:
> >
> > <html>
> >          <head>
> >          </head>
> >          <body>
> >          <jsp:include page="/servlet/HelloWorldExample" flush="true">
> >          </jsp:include>
> >          </body>
> > </html>
> >
> > Accessing index.jsp runs the servlet, accessing index.html
> > does not. Any
> > help with this matter will be greatly appreciated.
> >
> > Regards,
> > Stuart
> >

Reply via email to