wood burning stoves 2.0*
The moose likes JSP 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
JavaRanch » Java Forums » Java » JSP
Bookmark "Unable to compile class for JSP" Watch "Unable to compile class for JSP" New topic
Author

Unable to compile class for JSP

swapnel surade
Ranch Hand

Joined: Mar 05, 2009
Posts: 129
Hello All,

I'm trying to run the jsp on Apache tomcat 6, but getting following error.

org.apache.jasper.JasperException: Unable to compile class for JSP:

Why this error is coming ?

Thanks
Nilesh Miskin
Ranch Hand

Joined: Jun 17, 2010
Posts: 44
This seems like an environment variables related issue to me. See if your JAVA_HOME/bin directory is in PATH environmental variable. also make sure you are using full JDK & not JRE.


Nilesh Miskin
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Below that error it must be showing which line of your JSP is not compiling into a Servlet. There must be some error in your JSP page (most probably syntax error)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
swapnel surade
Ranch Hand

Joined: Mar 05, 2009
Posts: 129
@ankit
There is no code in the jsp page only some html tags are present. If I change the extension to .html its working fine but no jsp page is getting executed.
Ankit Tripathi
Ranch Hand

Joined: Oct 17, 2009
Posts: 198
Hi,
Make sure that your classpath and path variables are set properly. Also see whether you have set the classpath to the servlet.jar file which exists in lib dir of tomcat.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to compile class for JSP
 
Similar Threads
jsp:usebean
jspInit ....
JSP
How to access a JSP Page-Urgent
Compiling result.jsp (page 89 HFSJ)