• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Class not found error in JSP

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
milan doshi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Frank,
That was really quick and also very helpfull.
Milan
 
milan doshi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Frank,
That was really quick and also very helpfull.
Milan
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic