Hey!
Really is not so daunting.
Basically the View (JSP) sends request parameters to the Servlet (Control)
the Servlet calls the appropriate helper class (may a JSPBean) and passes
the parameters for processing. Then the helper class processes the parameters
and passes the results back to the Controller for either setting session
attributes and forwarding to the View (JSP) or the Controler just forwards
to the JSP and the JSP uses the JSPBean, if implemented.
That's all that needs to be done. I've explained it in two sentences, albeit
packed ones.
Sans adieu,
Danny Rubis
roy woods wrote:
> --- Nic Ferrier <[EMAIL PROTECTED]> wrote:
> > >>> roy woods <[EMAIL PROTECTED]> 19-Apr-01
> > 10:21:31 AM >>>
> >
> > >So from what you are saying the two of them (JSP
> > and servlets)
> > >complement each other rather than compete. As you
> > probably
> > >have guessed, I am new into Servlets and I asked
> > the question
> > >to see the bigger picture.
> >
> > They do complement each other, yes.
> >
> >
> > >I never heard of MVC. How does it fit into all
> > these?
> > >I guess I need to investigate this.
> >
> > MVC stands for:
> >
> > Model View Control
> >
> > It's a program design idea. You split the
> > functionality into 3
> > differents parts:
> >
> > Model - represents the data, ie: a set of objects
> > representing your
> > data
> > View - displays the model to the user, eg: a JSP
> > page
> > Control - handle operations on the model, eg: a
> > servlet
> >
> > The traditional way to implement this is to have a
> > set of beans
> > stored on the session as your model and JSP pages
> > that reasd off the
> > beans and display data in the beans inside HTML
> > tags. The JSP page
> > actions (eg: form submits) point to a servlet which
> > does all the work
> > analyzing the request and modifying the model beans.
> > Once it's
> > finished the servlet forwards the request to another
> > JSP page for
> > display.
> >
> > This works quite well but I find it a pain to
> > implement, you have to
> > have one servlet for every JSP page or very messy
> > servlets.
> >
> >
> > Lots of people have been working hard the past
> > couple of years to
> > come up with new and easy ways to separate view and
> > control. The
> > XML/XSLT paradigm is another way of doing this and
> > is a bit cleaner
> > and more logical than JSP... but it's generally
> > harder to fit into
> > your development model because it can't really be
> > reto-fitted into
> > some HTML.
> >
> >
> > Nic
>
> Having just finished reading an article on the
> issue(MVC) I can say intermingling servlet and JSP is
> an interesting approach. The article said that the
> original JSP specification urged the use of two
> models. Model 1 and model 2. Model 1 says that you
> should have all your request processing as well as
> presentations in JSP. It said, as you rightly pointed
> out, that it is only good for small-scale applications
> but when the application system is large and complex
> you have to use Servlet/JSP in a mix. The complexities
> involved in this approach is, I think, rather daunting
> and may put many newbies off. I have yet to examine
> XML/XSLT paradigm.
>
> roy_
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> ___________________________________________________________________________
> 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