• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help bean!

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
org.apache.jasper.JasperException: Unable to compile class for JSPE:\TOMCAT\work\localhost_8080\_0002fcounter_0002ejspcounter_jsp_0.java:61: Class cou.counter not found. cou.counter cc = null;
为什么老是找不到我的BEAN呢
Why don't I find my bean?
My bean file in:
TOMCAT\webapps\ROOT\cou
My jsp file in :
TOMCAT\webapps\ROOT
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Put your bean in TOMCAT\webapps\ROOT\web-inf\classes\cou dir.
This will solve your problem.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"sandmax sandmax",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Thanks.
Dave
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
same question here!
I put my Bean under TOMCAT\webapps\ROOT\web-inf\classes\MyPackage dir
and my jsp under TOMCAT\webapps\ROOT\
there is no error message , but no result either.

in my servlet I add my Bean to the ServletContext,using:
records = new Records();
...
getServletContext().setAttribute("records",records);
and in my JSP I access bean using:
<jsp:useBean id="records" class="MyPackage.Records" scope="application" />
</jsp:useBean>
<%
System.out.println("here Show the records");
Vector v = records.getRecords();
int p = 0;
while(p < v.size()){
out.println(v.elementAt(p));
System.out.println(v.elementAt(p).toString());
p++;
}
%>
Servlet is in the same package as Beans'. I made no modification with any file to configure Tomcat.
Why I get no result?Could anybody tell what is going wrong?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic