tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <>
Subject Re: Jikes for JSP compilation is broken
Date Wed, 19 Jan 2000 20:22:54 GMT wrote:
> Hans Bergsten wrote:
> > Maybe it would be better to actually replace the jspCompilerPath init arg
> > with a jspCompilerClass arg, and set it to
> org.apache.jaspercompiler.JikesJavaCompiler
> > when Jikes is used. Compared to the old approach, the jikes binary must
> be in
> > the PATH, since the absolute path to the binary can no longer be
> specified
> > with this solution. That should not be a problem though.
> The JSPEngine could certainly pass the options to the JavaCompiler it just
> created.  The JikesCompiler could easily check to see if there was a
> jspCompilerPath specified, and if so, use it.

Yes, I guess that would work. It's just that if we go for pluggable compilers
as separate classes (the "right way"), each class may then need their own
init params. For instance, the jspCompiler param may only be needed for Jikes,
not for some pure Java compiler that doesn't call the compiler with a system

If you want to go this way, I suggest adding a new standard init param for
the JspServlet:

  jspCompilerClass:  the name of a Compiler subclass used to compile JSP
                     generated classes.

And then per subclass define other init parameters, such as the following
for JikesCompiler:

  jikesCompilerPath: the absolute path to the jikes binary, or just "jikes"
                     if the binary is in the PATH.

> I'm also inclined to support
>    <init-param param-name="jspCompiler" param-value="jikes"/>
>  as a shorthand for
>    <init-param param-name="jspCompilerClass" param-value="
>    org.apache.jasper.compiler.JikesJavaCompiler"/>
> With an example or two checked in as comments to the appropriate web.xml
> files.

I prefer my suggestion above; it's not clean to provide special support for
one specific compiler in a pluggable compiler model IMHO.

Hans Bergsten
Gefion Software

View raw message