wood burning stoves*
The moose likes Tomcat and the fly likes Unable to compile class for JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Unable to compile class for JSP" Watch "Unable to compile class for JSP" New topic
Author

Unable to compile class for JSP

shivani anand
Ranch Hand

Joined: Dec 28, 2000
Posts: 155
Hi!

I've installed jakarta-tomcat-5.5.6 and I am trying to access my jsp through explorer and I am getting following error ..
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.JspCompilationContext.compile(JspCompilationContext.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.io.FileNotFoundException: /var/jakarta-tomcat-5.5.6/work/Catalina/localhost/_/org/apache/jsp/cu/emailreg/process_005frequest_jsp.java (No such file or directory)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(FileOutputStream.java:179)
java.io.FileOutputStream.<init>(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:131)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.6 logs.


--------------------------------------------------------------------------------


Any idea what's happeningt? Please send reply ASAP.

thanks
SA
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
Well does this:
/var/jakarta-tomcat-5.5.6/work/Catalina/localhost/_/org/apache/jsp/cu/emailreg/process_005frequest_jsp.java
directory structure exist?

Try deleting the entire contents of your tomcat/work directory and restart tomcat.


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

This could also happen if the user that Tocmat is running under doesn't have sufficient permissions to read and write to the work directory.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to compile class for JSP
 
Similar Threads
JasperException Error
environmental variable issue
Suddenly stopped working
JAVA_HOME does not point to the JDK
Struts Example not working!