This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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
 
GeeCON Prague 2014
 
subject: Class not found error in JSP