You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Chris Brown <br...@reflexe.fr> on 2003/08/07 15:39:51 UTC
JSP error with standard Javac (and a workaround) with Tomcat 4.1.27
Hi,
I've just upgraded from Tomcat 4.1.24 to 4.1.27, and am using the default
out-of-the-box configuration (see below). Tomcat now refuses to compile
JSPs with the default settings. I need to modify conf/web.xml such that the
"fork" init-param for the JSP servlet is set to "true" (not "false", which
is the default)... and then it works.
Basically, without "fork=true", it complains that it can't resolve
JAVA_HOME. When it forks, all goes well. See the output below for more
information.
Here's my config:
- Win2000 SP4 (no other web servers running/installed)
- Sun's J2SE 1.4.2 SDK, installed in d:\java\jdk1.4.2
- JAVA_HOME is set as a system environment variable,
pointing to d:\java\jdk1.4.2
- "tools.jar" is in the "lib" subdirectory of JAVA_HOME.
- Tomcat 4.1.27, downloaded as a binary release from main
website http://jakarta.apache.org/tomcat/
Hope this helps iron out a wee problem!
- Chris B.
____________________________________________________________
2003-08-07 15:29:24 Info: Compile:
javaFileName=D:\inetpub\tomcat\work\Standalone\localhost\open\/login_jsp.jav
a
classpath=/D:/inetpub/tomcat/webapps/open/WEB-INF/classes/;D:/inetpub/tomcat
/common/lib/ant.jar;D:/inetpub/tomcat/common/lib/commons-collections.jar;D:/
inetpub/tomcat/common/lib/commons-logging-api.jar;D:/inetpub/tomcat/common/l
ib/jasper-compiler.jar;D:/inetpub/tomcat/common/lib/jasper-runtime.jar;D:/in
etpub/tomcat/common/lib/naming-common.jar;D:/inetpub/tomcat/common/lib/namin
g-factory.jar;D:/inetpub/tomcat/common/lib/naming-resources.jar;D:/inetpub/t
omcat/common/lib/servlet.jar
cp=D:\inetpub\tomcat\webapps\open\WEB-INF\classes
cp=D:\inetpub\tomcat\common\lib\ant.jar
cp=D:\inetpub\tomcat\common\lib\commons-collections.jar
cp=D:\inetpub\tomcat\common\lib\commons-logging-api.jar
cp=D:\inetpub\tomcat\common\lib\jasper-compiler.jar
cp=D:\inetpub\tomcat\common\lib\jasper-runtime.jar
cp=D:\inetpub\tomcat\common\lib\naming-common.jar
cp=D:\inetpub\tomcat\common\lib\naming-factory.jar
cp=D:\inetpub\tomcat\common\lib\naming-resources.jar
cp=D:\inetpub\tomcat\common\lib\servlet.jar
work dir=D:\inetpub\tomcat\work\Standalone\localhost\open
srcDir=D:\inetpub\tomcat\work\Standalone\localhost\open
include=login_jsp.java
Exception compiling Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
2003-08-07 15:29:24 Exception:
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(C
ompilerAdapterFactory.java:139)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:835)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:320)
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)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org