it is not a question that out.println() in servlets is bad. But what
what I saw in all JSP projects it is that these out.println() calls
are transfered to JSP pages. So what is a point ? I have not seen
(maybe yet :) true separation. And in my opinion it is not so easy
to do with the current JSP stuff. The reason - jsp elements are not
full integrated into html stuff. For any action (user events) I have
to have use javascript/CGI/Servlets and that mix and complicate the
model.

P.S. and I thing everybody from us anyway use some template stuff
for avoiding direct html-coding in servlets.

"Brien Voorhees" <[EMAIL PROTECTED]> wrote:

----- Original Message -----
From: Dmitri Namiot <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 1999 5:43 PM
Subject: Re: when to use Bean !!!


> looks like very logical and clear model, but see:
> you submit your forms to servelt. (I also like
> one servlet per application, just more easy to
> maintain). So your logic (application logic) is
> supported by servlet. What in that case the added
> value from JSP-beans to web-application ?

The benefit is that you (almost) never have to generate HTML from your java
code.  Debugging stuff like this is a real pain :
    out.println("Hello, <B>"+user.getName()+"</B>");
    out.println("<A HREF=\"+foo.url+"\">Click here</a>");
What happens when you want to change the look/style of your site?  Do you
want to go in and edit all those print statements in order to edit the HTML?
With JSP pages, all of the HTML is easily editable by your HTML designers.
You definitely don't want your HTML designers editing your servlet .java
files.

> Yes, we have some business rules implementation,
> localized within some java classes. But we can use these
> classes from servlet. I am feeling myself some trouble
> to split beans/servlets during own "jsp-projects" for the
> clients. Looks like in the most cases it is still "servlet-
> projects" because any attempt to add some dynamic/behavior
> to your JSP pages directly means java-coding within the page
> what is not a good.

    You'll probably still have a little java code in your JSP pages but
eliminating 90% of the javacode from your HTML pages and 90% of your HTML
from your java files is a real benefit.  Sure it would be nice to eliminate
100%, but it's still a worthwhile separation.

Brien Voorhees



ColdJava: java server side programming
http://coldjava.hypermart.net

____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at 
http://webmail.netscape.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

Reply via email to