You can't really forward from one JSP to another, because by the time you
get control, it has already opened an output stream on the output socket.

Thus screen logic control in a JSP would be a series of includes, which
would be pretty clumsy.  Other than that, it wouldn't be terrible to let
beans do the work of figuring out which JSP to go to.

Since screen logic is mostly a programmatic task anyway, and the servlet API
already has a request forwarding API, it naturally follows that you build
your screen logic in a servlet, data model in beans, and output display
presentation in JSP.  Each is designed for it's own particular purpose.  Why
do you want to swim upstream anyway?  :-P

-tg

----- Original Message -----
From: Neeraj Vora <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 1999 10:34 AM
Subject: Why use Servlets with JSP?


> Please pardon me if this is down a beaten-down track, but I really fail to
> understand the point of using servlets with JSP. JSP is one level higher
> than servlets and why not just embed beans in JSP to do the kind of
> pre-processing that servlets are said to be used for in this forum. Based
on
> the results from these beans, re-direction can take place to another JSP
> page in case of error, special condition etc.
>
> The only problems I find with current JSP (1.0) are as follows. I can't
> figure out a good and portable way to avoid the overhead of JSP page
> compilation and the overhead of instantiating application beans along with
> database connections upon the first request.
>
> Second, more ISPs support servlets than they do the JSPs, naturally. I
can't
> figure out an easy way to develop a web application using JSPs (say JSWDK
> 1.0) and then auto-magically convert the jsp pages into servlets
deployable
> on the ISPs supporting servlets.
>
> Any thought?? Thanks a bunch in advance..
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to