Design wise, I don't think you are supposed to load complex business logic
into EJB's.  EJB's represent the Model - not the controller.  Servlets
actually make fine controllers.

EJB's give you transaction processing for objects, and they give you a
persistence model.  If you don't need those things, but you are using them,
you might be adding unneeded complexity into your application.

Just a thought

john

ps. to the question - JSP represents the view layer.  You should use code in
an .JSP page as little as possible.  You should have only what you need in
there to display the data to your user and nothing else.  Keep the code in a
more maintainable place, and leave the HTML programming to the HTML guys.
Keep the Java for the heavy lifters.




-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Naveen Chandra
Sent: Wednesday, September 06, 2000 6:59 PM
To: [EMAIL PROTECTED]
Subject: Re: Servlet chaining.


Both are transactional, but the
main difference is, we cannot include the complex
business logic in the JSP but we can in EJB.
Let us take an example of 70 portals running under one applicaion
server and each wants different look and feel then we cannot have
70 JSP pages to render, rather we can have one JSP page to render
full portal and get the the look and feel logic from EJB and this
can be changed dynamically at the EJB level without interrupting the
client's pages.

Naveen.

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
George I Matkovits
Sent: Sunday, September 03, 2000 5:04 PM
To: [EMAIL PROTECTED]
Subject: Re: Servlet chaining.


EJBs are transactional JSPs are NOT.
regards - George

karthikeyan wrote:

> Hi all,
>
>   I have two questions regarding servlets
>
>   1. Generally it is not advisable to use service method under
HttpServlet, i
> know that HttpServlet is specialized to handle GET as well as POST
methods,
> besides this any other reason.
>
>   2. Difference between EJB and JSP in term's of placing the business
logic, i
> know that in both the case we can have business logic, but what is the
major
> difference.
>
> i need this info urgently
>
> bye
>
> b.karthikeyan.
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to