wood burning stoves
The moose likes Tomcat and the fly likes Bean class not found error... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Bean class not found error..." Watch "Bean class not found error..." New topic

Bean class not found error...

Tokunbo Oke
Ranch Hand

Joined: Sep 09, 2003
Posts: 57
I am using Tomcat 4.0 on windows 98, when I try to use my bean class from jsp program, I get class not found error. I read/followed all the similar problems in the forum but still have not been able to solve the problem.
The error I get is as follows:
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.

An error occurred at line: 1 in the jsp file: /handoff1.jsp
Generated servlet error:
D:\Apps\Apache\Tomcat4.0\work\Standalone\localhost\cartapp\handoff1$jsp.java:56: Class com.cartapp.user.User not found.
com.cartapp.user.User handoff = null;
An error occurred at line: 1 in the jsp file: /handoff1.jsp
Generated servlet error:
D:\Apps\Apache\Tomcat4.0\work\Standalone\localhost\cartapp\handoff1$jsp.java:59: Class com.cartapp.user.User not found.
handoff= (com.cartapp.user.User)

An error occurred at line: 1 in the jsp file: /handoff1.jsp
Generated servlet error:
D:\Apps\Apache\Tomcat4.0\work\Standalone\localhost\cartapp\handoff1$jsp.java:64: Class com.cartapp.user.User not found.
handoff = (com.cartapp.user.User) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.cartapp.user.User");
3 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)

Location of files
My jsp file is located at:
my bean class - User - is at:
Contents of the jsp file
<jsp:useBean id="handoff" scope="session" class="com.cartapp.user.User" />
This is the setting page!
The first 2 lines of the class are:
package com.cartapp.user;
public class User {

Environment settings
Can anyone please help. Thanks.

Ola Oke (SCJP 1.4)
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13005
Does your JSP have a <%@ page tag that imports the "com.cartapp.user" package?
I agree. Here's the link: http://aspose.com/file-tools
subject: Bean class not found error...
It's not a secret anymore!