We know servelets are java server components that can be used as a middleware... Same is the case with EJB....
I would like to know where servelets has to be used and where EJB...?? also please get me the advantages and disadvantages in using them...
Joined: Aug 10, 2001
This is covered in every book on J2EE -- I'd refer you there for details. In short, Servlets (with JSPs) provide the graphical front-end of a Web Application -- what you see in the browser. EJB's run the business logic of your application -- handling things like persistence and transactions. They are really nothing alike.