Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help! Where to put a bean class

 
P W
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Doug Kearns
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a page directive to your JSP page with the appropriate import attribute. eg.
<%@ page import="Sale" %>
Regards,
Doug
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!