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 17:51:26 GMT wrote:
> Hans Bergsten wrote:
> > The support for using Jikes to compile JSP pages, added through the
> PluginJavaCompiler
> > class, was broken by the latest changes done in
> org.apache.jasper.compilerCompiler
> > submitted by Preston, committed by Sam (version 1.6).
> You would have thought that since I committed both Preston's changes and
> the original support for Jikes that I would have caught this?  Don't answer
> that!  ;-)
> > The change is described as "Additional EBCDIC support". What breaks Jikes
> support
> > is that the -encode option is now always passed as a compiler argument,
> and Jikes
> > doesn't support it. This particular change is marked as "perhaps
> debatable?". Does
> > this mean it can be removed without breaking EBCDIC support again?
> What I think Preston meant was that the particular encoding choice was
> debatable - but my understanding is that the need to specify the encoding
> is very real on EBCDIC machines.
> I checked Jikes usage, and I see "-encoding" as a valid option, but I can't
> get it to be accepted.
> Contrasting the plugin approach taken by ant and Jasper, it looks like the
> right long term approach is to pass the desired options to individual
> setters to the plugin, and have that plugin know how to pass this
> information to the compiler in question.  Unfortunely, this requires a new
> class per compiler, but this seems to be the only way to cope with the fact
> that compiler options aren't standard.

Yes, I agree that this is a better long term approach. It also allows for
pure Java compilers, i.e. that doesn't need to be called through a system

> So what I propose to do is:
> 1) Remove the args parameter from JavaCompiler.compile, and add set methods
> for encoding, classpath, and outputDir.
> 2) Modify Compiler to call these setters on javac instead of constructing
> an argv.
> 3) Change SunJavaCompiler.compiler to construct the args from this
> information, exactly as it done today in Compiler.
> 4) Rename PluginJavaCompiler to JikesJavaCompiler and construct the
> argument list from only the classpath and outputDir information.  Add a
> comment that the encoding option should be added once it is properly
> supported by Jikes.

I agree with all of the above.

> 5) JSPEngine should be modified to expect "jikes" instead of a full path
> specification.

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.

Hans Bergsten
Gefion Software

View raw message