> Hi all,
> I don't really understand why you would give a class name to the beanName
> attribute when you can just set class and/or type attributes.

> Basically is there a difference betweens those 2 tags?
> <jsp:useBean id="foo" class="a.b.c" scope="page">
> <jsp:useBean id="foo" beanName="a.b.c" type="a.b.c" scope="page">

The beanName attribute is used to instantiate serialized Bean's rather than
just creating new instances from a classfile. If the Bean doesn't already
exist in the scope then the beanName attribute is passed to
java.beans.Bean.instantiate() which will instantiate the Bean for the class
loader. It first assumes that the name corresponds to a serialized Bean file
in which case it will bring it to life, but if can't find or invoke the
serialized Bean it will indeed just instatiate a.b.c.

Duane Fields

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to