I am also not sure if I am a good java guy working in a java centric organization
;)

I have been working on a servlet based product for the past one year and we are yet
to move fully into JSP - by the time 1.0 spec was frozen, we had architected our
product fully into servlet based.

Generating highly dynamic pages using servlets, is slightly, well, 'a pain'.  The
servlets write HTML code directly into the output stream or use a parser mechanism
which replaces parametric tags with actual values at runtime (which is a
performance bottleneck).

JSP fits in this pretty neatly - the key is not to overdo writing java code in the
HTML page so that every time the aesthetics change, the java writer has to recreate
the same stuff.  We have to do this with our servlet approach (every time a table
color changes, the servlet code changes!).

The performance degradation of JSP is ONLY for the first time the jsp page is
loaded.  If you have major concerns, have a person who will run through the
application once every time the web server comes up ;)

Anand

Mike Engelhart wrote:

> > i have a question reg the speed of jsp.
> > assume i have a servlet dedicated for presentation. i
> > have a jsp for a similar job. which will be better
> > regarding fastness of page generation after access to
> > db, scalability of the server etc. all other
> > parameters remain the same. i dont have single servlet
> > for control and presentation. i have different
> > servlets for them.
>
> I'm really not sure where he's getting that information (but then again, I'm
> not sure if I'm a "good java guy" :-)).  A JSP page is compiled into a
> servlet.  After compilation there is really no difference between a JSP and
> a servlet.  I guess on a very small scale there are differences between the
> output.   i noticed with JSWDK, the output includes lots and lots of
> whitespace ("\t", etc) to make the output formatted (which I think is
> important).  You could write a servlet to just stream out only HTML and no
> whitespace although debugging would be hell.  I'm really not sure how this
> would affect performance and if it would even be noticeable on a yardstick.
> The only other thing that may affect performance would be the individual
> servlet engine implementations but this is easily changed.  If one vendor is
> slow, you can switch to one that has a faster implementation.
>
> Mike
>
> ===========================================================================
> 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