I guess it depends on your requirements but very quickly two scenarios that
I can think of.
............
Scenario 1
For large applications I would base it on MVC architecture, ie EJB(Model),
JSP(View) and Servlet(Controller)
1) html form passes user request to servlets
2) servlet passes parameters to JSP
3) JSP gets data from EJB
4) JSP generates HTML and sends it back to user.
This is a scalable solution albeit a bit more complicated to design and
implement.
Scenario 2
For small applications typically a RAD prototyping effort I would eliminate
the controller, ie servlet and use the following approach
1) Form passes request to JSP
2) JSP gets data from EJB
3) JSP generates HTML and sends it back to user.
This makes it easier to develop quick prototypes but is not a scalable
solution. e.g if there are too many similar requests
with authentication required in each then it gets very messy doing this in
the JSP. Servlets are better designed do handle them.
Vivek
"Tye, Tim" <[EMAIL PROTECTED]> on 24/11/99 07:52:33
Please respond to A mailing list for Enterprise JavaBeans development
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Vivek Pande/Australia/IBM)
Subject: Re: The best approach
JSP can be used to create an HLML form and servlet.
When JSP is installed in the http server, it is compiled into an encoded
form and a servlet. So when using JSP there is no need to talk about
servlets.
JSP <-> EJB Is all you need.
-----Original Message-----
From: Devand, Sachin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 23, 1999 2:24 PM
To: [EMAIL PROTECTED]
Subject: Re: The best approach
i think the best is [if you have a fairly large project]
html form -> servlets -> ejbs -> JSP
regards,
Sachin
-----Original Message-----
From: Rickard �berg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 23, 1999 1:25 PM
To: [EMAIL PROTECTED]
Subject: Re: The best approach
Hey
jguich wrote:
> what is the best approach?
>
> 1. servlet -> jsp -> ejb
> 2. servlet -> ejb
> 3. jsp -> ejb
> 4. servlet -> jsp
Well, all of the above, depending on your needs ;-) What do you need?
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".