It's not a secret anymore!
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

Help! Where to put a bean class


Joined: Jul 12, 2002
Posts: 2
I'm using Timcat4.0 and trying to put a bean class Sale.clss in to
and I put my .JSP file into
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$ Class org.apache.jsp.Sale not found.
Sale entry = null;
Thank you for any suggestions.

Doug Kearns

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

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:
subject: Help! Where to put a bean class
It's not a secret anymore!