tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett M. Bergquist" <bbergqu...@snet.net>
Subject Re: Jikes and Tomcat for JSP compilation
Date Thu, 07 Jun 2001 10:58:03 GMT
I've got Jikes working with Tomcat 3.2.2.  Tomcat 3.2.x does not read the
"web.xml" file that is in "conf" so you need to update your own web
application's "web.xml".  Add the following lines:

    <servlet>
        <servlet-name>
            jsp
        </servlet-name>
        <servlet-class>
            org.apache.jasper.servlet.JspServlet
        </servlet-class>
        <init-param>
            <param-name>jspCompilerPlugin</param-name>

<param-value>org.apache.jasper.compiler.JikesJavaCompiler</param-value>
        </init-param>
        <init-param>
            <param-name>jspCompilerPath</param-name>

<param-value>d:\test\CanogaView\Jikes\win32\1.12\bin\jikes.exe</param-value>
        </init-param>
        <load-on-startup>
            -2147483646
        </load-on-startup>
    </servlet>

changing d:\test\CanogaView\Jikes\win32\1.12\bin\jikes.exe to the path where
you have jikes installed and also

    <servlet-mapping>
        <servlet-name>
            jsp
        </servlet-name>
        <url-pattern>
            *.jsp
        </url-pattern>
    </servlet-mapping>

Note that you will get a warning from stderr of something like:

    2001-06-06 04:06:34 - Ctx( /CanogaView ): Removing duplicate servlet jsp
jsp(org.apache.jasper.servlet.JspServlet/null)
    2001-06-06 04:06:34 - Ctx( /CanogaView ): Removing duplicate *.jsp ->
jsp(org.apache.jasper.servlet.JspServlet/null)

This is because Tomcat has a builtin JSP servlet and mapping configuration
and you are overriding this.


----- Original Message -----
From: chris brown <dev@reflexe.fr>
To: tomcat-user <tomcat-user@jakarta.apache.org>
Sent: Thursday, June 07, 2001 4:45 AM
Subject: Re: Jikes and Tomcat for JSP compilation


> Hi Peter (and anyone else following this thread),
>
> If it's any consolation, I've asked the same question on many mailing
lists
> over a long period of time, and nobody's given a working answer yet.
>
> I have a JDK installed (hence I've got "javac"), plus Jikes.  When using
> Jikes from the commandline, it works fine.  I've even uncommented the line
> in "web.xml".  But I never seemed to get it working, as in "the pages
still
> compiled, but there was no way of knowing if it was jikes or javac that
did
> it...".  I tried renaming Jikes.exe to _jikes._exe to see if Tomcat missed
> it, but it didn't complain, so I just assumed it hadn't been taken into
> account anyway.
>
> I suspected that I needed to copy all (or part) of the default web.xml
into
> each web-app's WEB-INF folder, uncommenting the "jikes" line as
appropriate.
> However, this didn't work at all well, as it seemed to give Tomcat a
> headache.  I've already posted on this ("overriding default web.xml with
> custom web.xml).  Not a lot of luck there either...
>
> Hope someone can give a clear answer as to how to do this -- and verify
that
> it works!
>
> -Chris Brown
>
> ----- Original Message -----
> From: "WEST, Peter"
> To: tomcat-user@jakarta.apache.org.mailing.list
> Sent: Wednesday, June 06, 2001 8:19 PM
> Subject: Jikes and Tomcat for JSP compilation
>
>
> >
> > can anybody point me to a straightforward "how to get Tomcat to compile
> JSPs
> > with Jikes rather than JDK" tutorial?
> >
> > So far I have changed web.xml server.xml (both of which made no
> difference).
> > I have also read that it may be necessary to change the source of a line
> in
> > webserver.jar I have the details of this but dont exactly believe it is
> > necessary??
> >
> > Any pointers? Ideas?
> >
> > thanks,
> >
> > Pete
>
>


Mime
View raw message