You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Richard Frazer <Ri...@haht.com> on 2002/06/18 00:02:43 UTC

Jasper/Jikes Compiler Patch

When running Jasper with the jikes compiler in Tomcat 4.1.5, there was a
problem where the first time you ran a jsp, you'd get a BuildException from
ant, but subsequent times would run fine.  The jsp was actually getting
compiled correctly, but ant apparently didn't think so.  The problems was
that we were calling javac.setEncoding and this isn't a valid option on
jikes.

Here's the fix in jasper/src/share/org/apache/jasper/compiler/Compiler.java:

Broken:

javac.setEncoding(javaEncoding);

Fixed:

// Configure the compiler object
if ( !"jikes".equals( options.getCompiler() ) ) 
{
    javac.setEncoding(javaEncoding);
}


This may be a problem in ant, but this gets me around the problem.