• 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

ejb in eclipse

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having trouble creating a javabean in a jsp in eclipse, j2ee version. When I use <jsp:useBean>, The application always claims it cannot find the javabean class. Should I keep the javabean class in the src folder or put it in the WebContent (WEB-INF?) folder manually. Sorry I'm somewhat new to j2ee.
Thank you, Dan.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dan,
First of all, note that an EJB (enterprise java bean) is completely different from a Java Bean. It's a poor choice of name. You likely have a regular Java Bean.

The class file for your bean needs to be in the WEB-INF/classes directory (or in a jar in the classpath.) Check where your Eclipse project is directing the compiled output.
 
Daniel Rutledge
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Jeanne, you're right I'm working with a regular JavaBean, not an EJB. Sorry about the misnaming. I created a classes folder in WEB-INF, which eclipse put in the src folder under Web App Libraries. I then put the class file there in the default package, but the it still isn't found when the jsp is compiled (******* cannot be resolved into a type). Thank you for any help you can give me.

By the way, I recognize you from JBB. You've written excellent questions and much else for the site; it proved invaluable for my progress in Java.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dan,
Hmm. What server are you using? Tomcat/JBoss/etc.

And thanks - it's nice to hear you recognize my name.
 
Daniel Rutledge
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Tomcat 5.5. Here's a screen cap of eclipse:

The "Player" class is the JavaBean I'm trying to use.
Again, thank you.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic