U can instantiate the java bean from the servlet but u need to use
java.bean.Beans class to populate the bean properties with that from the
http request . So you need to do introspection and population of properties
from within the servlet which otherwise can be easily achieved in the
jsp:useBean tag
----- Original Message -----
From: Ouyang, Jian <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 7:23 PM
Subject: java bean
> Hi,
>
> I want to know if I instantiate an object within the servlet, how to pass
it
> to the jsp pages and if I instantiate an object in the jsp page, how to
pass
> it to the servlet? It seems that I need to set the object as an attribute
of
> the request or session or something like that. Is it right.
>
> If I use servlet, do I need to use bean? or it is redundant? In other
word,
> is bean necessary when use JSP only?
>
> Thanks.
>
> Jian
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html