> Since JSPs and Servletts are exactly the same, where does the business
logic
> reside, in beans only?
>
> Ernie
Well, being pedantic can be troublesome, and it's really mostly important
for either large projects or sites that will become very large. For
example, context-free (stateless) services are harder to write a run a bit
slower, so a small site without too much traffic can get away with
maintaining lots of state. But a huge site with massive traffic won't be
able to scale well or handle failures as well, so context-free is the way to
go.
In this discussion, the business logic should not be in a servlet, for as
you said, JSPs are implemented in terms of servlets. Servlets are web-only
technologies (at least now), based on HTTP. If you have any other client
attempt to access your business logic (applet, desktop app, phone, etc.),
then servlets aren't appropriate, and I'd guess that means you'd not want
your business logic there unless the business logic is web-only, which it
may.
In general, the "new" model is for the business logic to be in EJBs, which
are remote calls from the servlet. If you are small enough, you can put
them in beans and skip the remote calls. Then, you can put other front ends
that can use those same beans, or if you need to migrate, you can simply put
a Remote interface on your beans and you're off and running (assuming your
params and return values are all Serializable of course).
David
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets