[[Sorry for the long delay]]
The 1.1 spec does not indicate that the validity of the translation has to
be checked every single time, although many (most?) implementations do
make this guarantee. Even in those implementations that perform this
test, the JSP 1.1 (& Servlet 2.2) specification indicates how one can
precompile a JSP page into a servlet class and avoid this cost.
==== re: binary output =====
I believe (but I am not 100% sure) there is nothing in the spec that
impedes a buffered JSP page from redefining "out" to be a binary
output stream and generating binary output. I have not tested this
(in my todo-list) and there may be limitations in implementations that
may not allow this.
It would make sense to use a JSP with some appropriate tag library to
generate some binary data, for example, something like:
<x:myImage height="xxx" width="...">
<x:someStuff ... />
</x:myImage>
Note that, even if there is some problem with the implementation/spec
that disallows this within a single request, one could use this
approach as a front-end to a servlet. I.e. the buffered JSP page uses
tag libraries to customize parameters and then does a
RequestDispatcher.forward() to a Servlet.
==== when to use what ====
In general I think of Servlets, beans, EJB components, and JSP tag
extensions handlers as "early binders", while JSPs (and web.xml and
other customization files) are "late binders" (I also call them
"user-serviceable parts"). In many cases you will want to use a
combination of the two types of technologies, but I am leery of saying
"you shall do this".
We will clear up some of these things in the next release of JSP and
Servlets.
Hope this helps,
- eduard/o
| Date: Fri, 24 Dec 1999 09:57:31 -0500
| From: Bosch Ricardo <[EMAIL PROTECTED]>
| Subject: Re: A basic doubt
|
| A JSP is checked every time is executed to see if any changes have been made,
| servlets do not suffer from this drawback which can add up under stressful
| situations
| -rickb
|
| Srihari Chandana <[EMAIL PROTECTED]> on 12/23/99 10:31:19 PM
|
| Please respond to [EMAIL PROTECTED]
|
|
|
| To: [EMAIL PROTECTED]
| cc: (bcc: Ricardo Bosch/CHASE)
| Subject: A basic doubt
|
|
|
| Hi friends,
| Iam quite comfortable using java and jsp.We(me and my team
| mates) developed a web application using jsp and beans.In that we never
| found the need to write a servlet(as the jsp creates one).My doubt is, when
| we create a web application, is there anything that CAN be done by a
| SERVLET but not by a JSP? If no, then where is the need to write servlets
| and call them in jsp as some of the queries in the mailing list indicate?
| I hope this is a very valid doubt.Iam expecting some replies to this query.
| Regards,
| Chandana.
===========================================================================
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