Joe: the final effect is the same but to me it's a big difference in style:
you specify what you want the JSP container to do for you instead of doing
it yourself.

I wrote a lot of quickie scriptlets to pass data back and forth between JSP
and backend code myself but prefer to use <jsp:usebean > whenever I can. I'm
just tired of looking at java code mixed within html elements.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Joe Cheng
Sent: Tuesday, December 11, 2001 12:06 PM
To: [EMAIL PROTECTED]
Subject: Re: newbie wanting to pass data from servlet to jsp


>> To me, the main advantage (or difference) to use a jsp bean (<jsp:usebean
...> over a class bean, i.e. a normal java class, is that you can clearly
specify the life cycle of your bean objects using the "scope" attribute. <<

How is this any different than simply placing the object/bean into the
session scope by hand?

My understanding is that the main advantage was supposed to be that the tag
syntax is easier for WYSIWYG editors and design folks to understand.  But in
the real world I've not found this to be a significant advantage.  I'd
rather be able to avoid the empty-constructor restriction.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to