You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Benjamin Butler-Cole <bb...@dataconnection.com> on 2003/08/07 14:52:28 UTC

A JSP preprocessor for Tomcat

Hi,

We're using Tomcat 4.1 in a production environment and have modified it to
include hooks for a JSP preprocessor.  Would you be interested in merging
this back into the main codebase?

We've created a Preprocessor interface and added code to
org.apache.jasper.compiler.ParserController to optionally instantiate an
implementation of the interface (specified in web.xml) and pass the input
JSP through it before compiling.

The preprocessor that we have implemented (which I do not propose releasing
because it is specific to our coding practices):
  - removes tracing code
  - provides an 'ifdef' function
  - removes excess carriage returns where they might be undesirable.

I'm sure that other people can think of other uses for a preprocessor.

We're using v4.1.12.  If there's any interest then I'll merge our changes
into the current version and make some diffs.

Ben



Jikes 1.18 JSP compiler support broken in TC 4.1.27

Posted by Chris Brown <br...@reflexe.fr>.
Hi,

I tried switching to Jikes with Tomcat release 4.1.27 (LE-JDK1.4), and it
would appear that the version of "ant.jar" you use internally in Tomcat to
compile JSP pages is out of date with regards to the latest versions of
Jikes (which have been around for a while now).

The Javac Ant task is specifying an "-encoding" option for Jikes, which
Jikes is refusing.  I'm using "Jikes Compiler - Version 1.18 - 21 November
2002" (according to the "jikes -version" command) on Win2000.  See below for
Jasper's output.

I have no problem using Jikes standalone, or with Ant 1.5.3's Javac task
(outside of Tomcat).

I'm using Sun's JDK 1.4.2 on Win2000 SP4.

Hope this helps,
Chris B.

____________________________________________________________

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file
    [javac] use: jikes [options] [@files] file.java...
    [javac] For more help, try -help or -version.
    [javac] Error: The option "-encoding" is unsupported in this build.



 at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:130)
 at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
 at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Jikes 1.18 JSP compiler support broken in TC 4.1.27

Posted by Chris Brown <br...@reflexe.fr>.
Hi,

I tried switching to Jikes with Tomcat release 4.1.27 (LE-JDK1.4), and it
would appear that the version of "ant.jar" you use internally in Tomcat to
compile JSP pages is out of date with regards to the latest versions of
Jikes (which have been around for a while now).

The Javac Ant task is specifying an "-encoding" option for Jikes, which
Jikes is refusing.  I'm using "Jikes Compiler - Version 1.18 - 21 November
2002" (according to the "jikes -version" command) on Win2000.  See below for
Jasper's output.

I have no problem using Jikes standalone, or with Ant 1.5.3's Javac task
(outside of Tomcat).

I'm using Sun's JDK 1.4.2 on Win2000 SP4.

Hope this helps,
Chris B.

____________________________________________________________

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file
    [javac] use: jikes [options] [@files] file.java...
    [javac] For more help, try -help or -version.
    [javac] Error: The option "-encoding" is unsupported in this build.



 at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:130)
 at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
 at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)