my dog learned polymorphism*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Help! Where to put a bean class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Help! Where to put a bean class" Watch "Help! Where to put a bean class" New topic
Author

Help! Where to put a bean class

P W
Greenhorn

Joined: Jul 12, 2002
Posts: 2
I'm using Timcat4.0 and trying to put a bean class Sale.clss in to
C:\Tomcat4.0\webapps\ROOT\WEB-INF\classes
and I put my .JSP file into
C:\Tomcat4.0\webapps\ROOT
When I open my jsp page, some errors generated ... like

org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 26 in the jsp file: /Sale.jsp
Generated servlet error:
C:\Tomcat4.0\work\localhost\_\Sale$jsp.java:60: Class org.apache.jsp.Sale not found.
Sale entry = null;
Thank you for any suggestions.


P W
Doug Kearns
Greenhorn

Joined: Jul 01, 2002
Posts: 2
Add a page directive to your JSP page with the appropriate import attribute. eg.
<%@ page import="Sale" %>
Regards,
Doug
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
P W,
JavaRanch has a Naming Policy Compliance with the policy is required to be entered in the drawing for a giveaway. Please reregister with a proper name.

Tomcat has a noted bug in regards to loading class that are in the default package. Add a package to your Sales class and put it in the proper location.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help! Where to put a bean class