Rajesh Nagarjunan wrote:

> Hi
>
> Here's the single servlet  model
>
> JSP's (presentation) ----> single servlet which dynamically creates an
> instance (more of a containmet scenario) of the business class based on
> the name of the JSP -----> DB
>
> Now how does this differ compared to a multiple servlet model where each
> JSP talks to a servlet which inturn gets a handle to logical classes and
> does DB transactions.
>
> Can someone explain which of the model is better in terms of what and in
> terms of the shortcomings of the either and a viable alternative.
>

This issue has been *very* extensively discussed on this mailing list, over the
last couple of years.  Check the list archives at <http://archives.java.sun.com>
and do a search for the term "Model 2".  There was also a JavaWorld article on this
topic in December 1999.

For a working example of an application framework that implements the "Model 2" (or
MVC) design pattern, check out Struts at <http://jakarta.apache.org/struts>.

>
> Also I would also like to know as to which occupies more resource in
> memory a servlet or a normal java object ( instance of a java class).

Well, since a servlet *is* a normal Java object, I'd have to say they take the same
amount of space :-).

>
> Awiting the favour of responses..... :)
>
> Thanks in advance,
>
> Cheers
> Raj
>

Craig McClanahan

===========================================================================
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

Reply via email to