In addition to Eugene's answer, both are components and part of the J2EE
Architecture. Servlets are used for the presentation logic of your
application. EJBs are used for handling the business logic of your
application.
As Eugene says, differences are huge, and you should not be statisfied by
those basic answers.
Christophe
> Servlet is a component that realizes request-response paradigm. Most
> common use is as a handler of the HTTP request. EJBs are distributed
> transactional components.
>
> The differences are huge - you'll better see some special literature.
>
> Eugene
>
> ----- Original Message -----
> From: "Bipin Kumar Gupta" <BipinG@(protected)>
> To: <J2EEPATTERNS-INTEREST@(protected)>
> Sent: Monday, August 18, 2003 7:57 AM
> Subject: [J2EEPAT-INT] Diff between Servlet and EJB
>
>
>> Hi
>>
>> can Any body give the details information about diff. between Servlet
>> and EJB.
>>
>>
>> Regards,
>>
>> Bipin
>>
>>
>> DISCLAIMER: Information contained and transmitted by this E-MAIL is
>> proprietary to Mascot Systems Limited and is intended for use only by
>> the individual or entity to which it is addressed, and may contain
>> information that is privileged, confidential or exempt from disclosure
>> under
> applicable
>> law. If this is a forwarded message, the content of this E-MAIL may
>> not
> have
>> been sent with the authority of the Company. If you are not the
>> intended recipient, an agent of the intended recipient or a person
>> responsible for delivering the information to the named recipient, you
>> are notified that
> any
>> use, distribution, transmission, printing, copying or dissemination of
> this
>> information in any way or in any manner is strictly prohibited. If you
> have
>> received this communication in error, please delete this mail & notify
>> us immediately at Mailadmin@(protected)
>> attachments, please scan for viruses.
>>
>> ====================================================================
>> Companion Site: http://www.corej2eepatterns.com
>> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List
>> Archive:
> http://archives.java.sun.com/archives/j2eepatterns-interest.html
>> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
> listserv@(protected)
>>
>
> ====================================================================
> Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive:
> http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
> listserv@(protected)
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)