do u mean req.getSession().setAttribute(...)?
because i remember u saying that in the JSP you have
<jsp:useBean id="user" class="UserBean" scope="session"/>
if you do mean req.setAttribute( ... ) then u just set the userbean into the
request scope not session scope.
-Tim

-----Original Message-----
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 1:37 PM
To: [EMAIL PROTECTED]
Subject: Re: Attaching a bean instance to a session


Yep, and it works for named instances created in the Controller servlet, but
not for the bean class from within Controller.  So, for instance (pun
intended(, if I

    String string = "This works";
    req.setAttribute( "myString", string);

from Controller, I can getAttribute from the JSP and display it as HTML.
But, given a JavaBean class MyBean the properties of which are set by
RecordSet values by a DAO class SQLgateway,

    req.setAttribute( "MyBean", MyBean);

from Controller yields "null" (in HTML) for each getAttribute in the JSP.


Mark

-----Original Message-----
From: Richard Yee
Sent: Thursday, January 03, 2002 11:50 AM

Mark,
Do you have a setAttribute("userbean", userBean); anywhere?

Regards,

Richard

___________________________________________________________________________
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

Reply via email to