Introduction to Enterprise Java Beans

Enterprise Java Beans are server-side components that service clients, where a client can be a Servlet ( so that includes JSP ), a 'regular', plain old server-side bean, a standalone (Swing) client application, another Enterprise Bean and even a browser/plugin supported applet.
EJB's are deployed aboard Enterprise Archives, ear's, zipped files, to Application Servers, such as :
  • Apache Geronimo, open source
  • JBoss, open source
  • IBM's Websphere AS, WAS
  • Oracle
  • Sun's AS
  • Weblogic
These Enterprise Servers support :
  1. web-applications : JSP/Servlets
  2. EJB's
  3. databases, JDBC
  4. JNDI, lookup service
  5. authentication, authorization, JAAS
  6. JavaMail, sending email
  7. transactions, JTA
  8. message queues, JMS
among other services, as required ( Platform Overview 2.6 ).
By installing the Eclipse WTP All-in-one distribution we get application server support built-in, so all we have to do, is point at the server's root directory via Window, Preferences, Server, Installed Runtimes, Add....

Having done that, we create a couple of projects through File, New, Other, (J2EE) Enterprise Application Project, name it and choose the server as target runtime. Then Next, New module..., check EJB module and Web module and Finish. After building you can select a JSP and choose Run, Run as, Run on server and if the gods favour you yet again, you'll get to see the JSP's result in a browser window.