aspose file tools*
The moose likes Servlets and the fly likes Class not found error in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Class not found error in JSP" Watch "Class not found error in JSP" New topic
Author

Class not found error in JSP

milan doshi
Ranch Hand

Joined: Nov 03, 2000
Posts: 43
Hello,
I am trying to develop a basic JSP application wherein I am trying to import a bean calss called "counter".
I have saved the counter.java & counter.class files in the Root Directory of Tomcat (i.e the same directory wherein lies my JSP file ).
I am trying to import the bean using
<%@ page import="counter"%>
:
:
I am however getting the following error:
org.apache.jasper.JasperException: Unable to compile class for JSPE:\jakarta-tomcat\work\localhost_8080\_0002fbeancounter_0002ejspbeancounter_jsp_0.java:13: Class counter not found in import.
import counter;
Can someone please guide where am I going wrong?
Thanx in Advance,
Milan
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
This is becoming a Frequently Asked Question. The answer is that classes should go in the WEB-INF/classses subdirectory, below where your html files go.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
milan doshi
Ranch Hand

Joined: Nov 03, 2000
Posts: 43
Thanx Frank,
That was really quick and also very helpfull.
Milan
milan doshi
Ranch Hand

Joined: Nov 03, 2000
Posts: 43
Thanx Frank,
That was really quick and also very helpfull.
Milan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class not found error in JSP
 
Similar Threads
Need help with using beans on Tomcat
Problem in accessing an attribute through action elements
simple JSP and JavaBean, error 500
ARRRGGGGHHH - Stupid Javabeans - Again! :(
InstantiationException using tomcat4.0 in jsp with beans