This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes JasperException: Unable to compile class for JSPC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JasperException: Unable to compile class for JSPC" Watch "JasperException: Unable to compile class for JSPC" New topic
Author

JasperException: Unable to compile class for JSPC

Manish Jaswal
Greenhorn

Joined: May 10, 2010
Posts: 2
Hi,

I am getting the following exception while running a web application on Tomcat 3.2.1.

org.apache.jasper.JasperException: Unable to compile class for JSPC:\jakarta\tomcat\jakarta-tomcat-3.2.1\work\localhost_8080%2FMessageWeb\_0002ftest_0002fjsp_0002fError_0002ejspError_jsp_0.java:15: Class test.msg.exceptions.MsgException not found in import.
import test.msg.exceptions.MsgException;

.
.
.
Earlier this application was working fine, but when I removed the old test server and created a new one, I am getting this exception.


Please help.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The class you're trying to import doesn't exist on the classpath.

Also, please see the JavaRanch naming policy and change your display name to conform with this policy. Thanks!
Manish Jaswal
Greenhorn

Joined: May 10, 2010
Posts: 2
The class that i am using is in classes folder of WEB-INF. I am using this class in JSP. But I am not able to use any of the classes that I have created in javasource folder.
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

As the class is part of a package so it should be in proper folder structure means yours class should be under:
classes\test\msg\exceptions folder under WEB-INF.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Make sure when you deploy it the Java classes have been compiled and are properly deployed (under /WEB-INF/classes, in package hierarchy, as mentioned).
 
Don't get me started about those stupid light bulbs.
 
subject: JasperException: Unable to compile class for JSPC
 
Similar Threads
Tomcat and Mysql Configuration
Want my exceptions to be caught by errorPage JSP ?
Java Bean in JSP
Calling A Class From JSP
Class not found