This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat not finding beans when a context is used

 
Paid O'Cuana
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
jakarta-tomcat3.3/webapps/examples/WEB-INF/classes/cusstomerProfile
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
Posts: 449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

$TOMCAT_HOME/webapps/lucidity_web/WEB-INF/classes/customerProfile
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic