• 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

when to use servlets and when to use EJB

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when to use servlets and when to use EJB...I have a big confusion.I can get all the features what ever there in EJB are also there in Servlets or JSp then why should i go to EJB.Except for transactions.
Regards
Vijaya
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the J2EE specification clear description had given when to use Servlets,JSP and EJB.
This approach is called MVC(Model View Controller)
we should devide our application to MVC design,such as chop the entire application to presentaion layer ,web layer ,business layer and data layer.
Choose HTML/JSp presentaion layer,Servlets for web layer or tier,EJB for Business Layer(Session beans for action components(tipically performs business operations),entity beans to data components(tipically for database access pupose).By using this kind of apprach we can achive better coordination among layers and quick results
-krish
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"krish",
Thanks for joining JavaRanch, but could you just take a quick look at the naming policy and edit your profile.
Also, only members with valid names will be eligible for the book giveaways.
Thanks
Simon
Bartender (moderator) of "J2EE and EJB" forum
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic