File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes EJB vs JSP & servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB vs JSP & servlets" Watch "EJB vs JSP & servlets" New topic

EJB vs JSP & servlets

Steve Jerome

Joined: Mar 03, 2007
Posts: 22
Why should we use EJB when servlets and JSP can be used to develop application? How is EJB advantageous in developing distributed application?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

Session beans are used when you need more services from the container like security and transactions.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Krithika Srinath
Ranch Hand

Joined: Apr 11, 2006
Posts: 52
To add...
- EJB can also make the data access easy when you use CMP.

This article will be of help to get more visualisation on when to go for EJB.
Steve Jerome

Joined: Mar 03, 2007
Posts: 22
thanks for the answer.
I agree. Here's the link:
subject: EJB vs JSP & servlets
jQuery in Action, 3rd edition