> Question David.
>
> Since JSPs and Servletts are exactly the same, where does the
> business logic
> reside, in beans only?
Not always. Model 2 would have all forms (and even all links/requests if you
want) go to a single controller. That controller can do one of many things,
but the way I like best is what Daniel and Craig are doing..using an action
class per form/page to handle the action of that particular form. The use of
beans in this case would be entity related. Storing of the data (Model in an
MVC pattern) and get/set methods for that data, as well as any methods that
work on that data, such as storing it, retrieving it, etc. The logic
class(es) are used by the action class to perform the logic with the data
from the form, and return a result back to the action class, which then
forwards to a JSP page to display the results, or, to display a second (or
more) form in a series of forms to complete a transaction.
Ofcourse..this is but one use of JSP. You could use Model 1/1.5 and have JSP
pages call on JavaBean methods to do the logic, as well as use JavaBeans to
store session state information.
> > > With regard to jsp and it's scalability, if you have one
> developer that
> is
> > > not as well versed at closing and killing a connection on
> one page, you
> > can
> > > lose all of your connection pooling in a matter of hours.
> > >
> > > Those are just things that CF takes care of for you.
> > >
> > > Jeff Steiner
As noted by another reply, I cant understand why any page would open a
connection. The page should be considered one of many views of data and
logic. If it is doing logic and/or persistence in it, in my opinion that is
a very bad design. The beauty of the Model 2 (and now the Model 2++ or Model
3) is that you use JSP to display the results as well as static pages. Its a
VIEW of a result. Thus, not only can JSP be used, but other client
applications can use the logic and persistence of the application and view
it in their own way. The example I always liken this to is the bank use. A
bank has a "central" database and logic server. The teller has one view of
it. The ATM is yet another view of the same data (and logic use). And the
web can be a third view of the same data. I would bet a well organized
application for banks would allow all three of these views to use the same
logic code and the same data (obviously), so that each view doesn't require
any logic in it at all. Infact, the only logic that should ever be done in
the VIEW is logic to display things..such as looping or conditional
statements to display one thing or another. Even so, with JSP 1.1, taglibs
and/or the use of javabean "html helper" methods can keep the java code out
of JSP pages, other than the simple bean.getXXX() calls.
===========================================================================
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