jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes Tomcat not finding beans when a context is used Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Tomcat not finding beans when a context is used" Watch "Tomcat not finding beans when a context is used" New topic

Tomcat not finding beans when a context is used

Paid O'Cuana

Joined: Mar 05, 2003
Posts: 24
Hello all.
My problem is this:
I have my JSP files stored in /usr/local/jakarta-tomcat3.3/webapps/examples/jsp
and I have that path set as the docBase for my context "lucidity_web".
However, though JSPs can no we viewed at URLs such as blah.com/lucidity_web/*, whenever I try to use a java bean,
(e.g. <jsp:useBean id="customerProfileBean" scope="session" class="customerProfile.customerProfileBean" />
an error is returned which tells me it can't find the bean.
I have this customerProfileBean class in:
Here's the error:
org.apache.jasper.JasperException: Unable to compile /usr/local/jakarta-tomcat3.3/work/DEFAULT/lucidity_web/validateLogin_1.java:71: Class customerProfile.customerProfileBean not found.
customerProfile.customerProfileBean customerProfileBean = null;
/usr/local/jakarta-tomcat3.3/work/DEFAULT/lucidity_web/validateLogin_1.java:74: Class customerProfile.customerProfileBean not found.
customerProfileBean= (customerProfile.customerProfileBean)
/usr/local/jakarta-tomcat3.3/work/DEFAULT/lucidity_web/validateLogin_1.java:79: Class customerProfile.customerProfileBean not found.
customerProfileBean = (customerProfile.customerProfileBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "customerProfile.customerProfileBean");
3 errors

Any ideas on solving this?
Vijay S. Rathore
Ranch Hand

Joined: Oct 29, 2001
Posts: 449
Hi Paid,
If you are referring to lucidity_web as your doc context, the only thing I can think of is your .class file should also be in


SCJP, SCJD, SCWCD1.4, IBM486, IBM484, IBM 483, IBM 287, IBM141, IBM Certified Enterprise Developer - WebSphere Studio, V5.0
Author of IBM 287 Simulator Exam
I agree. Here's the link: http://aspose.com/file-tools
subject: Tomcat not finding beans when a context is used
Similar Threads
ControllerServlet 404 error
Apache-Tomcat in Solaris Error 500
Tomcat hangs up
Problem: Beans with JSP in Tomcat
Internal Servlet Error ?