getting the follg error after installing
tomcat5.0, jre, j2se and ms-access


HTTP Status 500 -

type Exception report
message
description The server encountered an internal error
() that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile
class for JSP

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
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

org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)

org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)

org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is
available in the Apache Tomcat/5.0.28 logs.

Apache Tomcat/5.0.28

i'm occuring this following when i acess my jsp file

plz help me in this regards

thank u in advance

Recommended Answers

All 4 Replies

root cause
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

Have you actually checked your setenv/catalina script to
ensure that the variable JAVA_HOME points to a JDK
(i.e. /usr/java) or to a jre (i.e. /usr/java/jre). If your
JAVA_HOME variable points to a jre, then there is no javac
(as the error message says) to use inorder to compile the
jsp.

Have you actually checked your setenv/catalina script to
ensure that the variable JAVA_HOME points to a JDK
(i.e. /usr/java) or to a jre (i.e. /usr/java/jre). If your
JAVA_HOME variable points to a jre, then there is no javac
(as the error message says) to use inorder to compile the
jsp.

thank u for ur response
may i need to install jdk to avoid this error

thank u for ur response
may i need to install jdk to avoid this error

If all you have is a jre, then yes, you need to install a jdk. Servlets will work
without a jdk as they are compiled before tomcat ever sees them. JSP pages,
on the other hand, are translated into java classes/files and then compiled by
tomcat the first time they are accessed, or the first time they are accessed
after having been changed since the last time it was compiled. Tomcat cannot
do this unless it has access to a compiler (javac). It only has this if a jdk is
installed and JAVA_HOME points to the jdk, not the jre (which is also included in
the jdk as a jre subdirectory).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.