jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Servlet and ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Servlet and ejb" Watch "Servlet and ejb" New topic

Servlet and ejb

P.Praveen Jesudhas

Joined: Jul 23, 2006
Posts: 26
can you please tell me the basic purpose of servlet's and ejb.
Jaime M. Tovar
Ranch Hand

Joined: Mar 28, 2005
Posts: 133
A servlet is an interface that lets you work in a client-server model. The client submits a request to the server and the server uses a Servlet implementation to handle the client request and send a response. The servlet definition is in Java EE.

An ejb is a pattern, there are many kinds of ejb, but I think in essence they are a business logic encapsulation unit. They are also part of the Java EE.

In the simplest scenario a client wants something from a server, then sends a request lets say via a browser, then the server uses a specific servlet to handle the request. The servlet understands what the client wants and calls an ejb who is the one that knows the business logic. The EJB returns the results, the servlet interprets the results and sends the response to the client.

Both of them can be applied in many kinds of scenario, some ejb only talk with other ejb, some let you send messages to applications, etc.

She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
Please ask these questions in the servlet and ejb forums. For such questions you can always "GOOGLE".

"A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model"
Reference URL

"Enterprise Java Beans is a component architecture for the development and deployment of object-oriented, distributed, enterprise-level applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, multi-user and secure."
Reference URL

if you can't understand the above definitions please feel free to ask !!
have a nice day
P.Praveen Jesudhas

Joined: Jul 23, 2006
Posts: 26
thank you guyz
I agree. Here's the link: http://aspose.com/file-tools
subject: Servlet and ejb
It's not a secret anymore!