| Author |
Please help me solving this error
|
Hrishikesh Maluskar
Ranch Hand
Joined: Jun 19, 2008
Posts: 114
|
|
when i called a jsp from servlet ,it gave the following error. Can somebody please try and solve it. 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) com.example.web.BeerSelect.doPost(BeerSelect.java:24) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) 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) com.example.web.BeerSelect.doPost(BeerSelect.java:24) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
|
SCJP 1.5
www.licexpadvice.com
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
Please provide more details (which container you are using,..) May be something to do with your java installation. Are you using tomcat? Then you need either JAVA_HOME set to your JDK installation or JRE_HOME set to your jre installation(if you have only JRE). (compatible version with the tomcat of course).
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
Sandeep Bhandari
Ranch Hand
Joined: Apr 16, 2004
Posts: 201
|
|
yes, the root cause is in your post as: root cause Unable to find a javac compiler; Check that java is installed and proper classpath and path variables are set.
|
SCJP 96% | SCWCD 90%| SCJP mock exams | My SCJP blog
|
 |
Ranjan Pwar
Greenhorn
Joined: Dec 12, 2008
Posts: 13
|
|
I also got the same twice problem but i just uninstall it and then reinstall it and the problem got solved. I thind you do the same.
|
 |
 |
|
|
subject: Please help me solving this error
|
|
|