i tried this with tomcat 4.1.8 to 4.1.10 with JspServlet's config:
<init-param>
<param-name>compiler</param-name>
<param-value>jikes</param-value>
</init-param>
getting this error:
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
at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:182)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...
in the log i got:
2002-09-01 20:13:09 Compiler jikes
2002-09-01 20:13:10 Error compiling file:
C:\java\jakarta\tomcat\jakarta-tomcat-4.1.10\work\Standalone\localhost\_\/index_jsp.java
[javac] Compiling 1 source file
looking into the code i have found the method getServletJavaFileName() in
JspCompilationContext:
public String getServletJavaFileName() {
if (servletJavaFileName != null) {
return servletJavaFileName;
}
String outputDir = getOutputDir();
servletJavaFileName = getServletClassName() + ".java";
if (outputDir != null && !outputDir.equals("")) {
if( outputDir.endsWith("/" ) ) {
servletJavaFileName = outputDir + servletJavaFileName;
} else {
servletJavaFileName = outputDir + "/" + servletJavaFileName;
}
}
return servletJavaFileName;
}
...
i guess since outputDir is only checked for "/" and not window's file
separator "\" the path to the generated jsp becomes wrong.
since i am not really a developer and more a tomcat user i would like to ask
the tomcat-devs for any ideas (although I would have a simple solution with
file separator ;-)
thanks
klaus
_________________________________________________________________
Mit MSN Fotos k�nnen Sie kinderleicht Ihre Fotos ausdrucken und Freunden zur
Verf�gung stellen: http://photos.msn.de
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>