tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tõnu Põld <Tonu.Po...@andmevara.ee>
Subject RE: Trouble getting Tomcat to parse .html files of JSP tags.
Date Wed, 18 Apr 2001 07:59:20 GMT
Hi,

I suspect the problem relies in Apache and mod_jk configuration, and not in
Tomcat engine, because the Tomcat web server (default port 8080) seems to
serve the .html files with JSP tags correctly.

The only configuration needed in Tomcat engine side is the servlet-mapping
in web.xml:
<servlet-mapping>
         <servlet-name>
             jsp
        </servlet-name>
        <url-pattern>
             *.html
        </url-pattern>
</servlet-mapping>

There might be some directives like "Location" or "Directory" in your
Apache's httpd.conf, which force the Apache to pass by the Tomcat and take
the .html files directly from filesystem.

Sorry, but I don't know the Apache's directives very well.

Regards,
Tõnu

> -----Original Message-----
> From: Stuart Allen [mailto:sallen@steptwo.com.au]
> Sent: Wednesday, April 18, 2001 6:36 AM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Trouble getting Tomcat to parse .html files of JSP tags.
> 
> 
> Hi Tõnu
> 
> It's always the way isn't it, two minutes after I sent the 
> last message it 
> started to work (well, sort of). I changed the mapping from 
> *.html to /. It 
> says in the Servlet Specification that this makes jsp the 
> default servlet 
> of the application. This is quite acceptable for what I am 
> trying to do, 
> but I still don't know why *.html didn't work...
> 
> 
> 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:sallen@steptwo.com.au]
> > > Sent: Tuesday, April 17, 2001 8:53 AM
> > > To: tomcat-user@jakarta.apache.org
> > > 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
> > >
> 

Mime
View raw message