Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to compile class for JSP

 
swapnel surade
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)...
 
swapnel surade
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic