• 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

jsp: useBean not finding Bean class plz help

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I'm using useBean tag to set and get a property of a bean ..i have copied the jar file into /lib of jws2.0 but it is not finding the Bean Class .. Please suggest what to do or verify
thanx
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add your bean class directory in your classpath
Personally i never use set and get Property instead i call the bean methods directly.
For your reference this is the syntax with a JSP calling the getData method of a Test bean class(inside package "myPackage")

FYI, "scope" can be anything depending on your requirements
Ajan

[This message has been edited by Ajan Balakrishnan (edited February 20, 2001).]
 
amit shukla
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx ajan .. but even after setting that in my class path i'm not able to retrieve that.. but i'm not using page directive with useBean is it reqd.i'm using the following code. i haven't serialized any instance all i have is Hello.jar which has HelloBean.class in it, in the classpath..
<html>
<body>
<jsp:useBean id="hello" class="HelloBean"/>
Hello, <jsp:gatProperty name="hello" property="name"/>
</body>
</html>
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't put your application specific stuff the server directories! Your webapp (context) should have a WEB-INF directory. Put your classes in WEB-INF/classes -- using the directory naming convention for packages -- and your jars in WEB-INF/lib.
- Peter
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic