The following snippet works without a problem:

try
{
        ...

        ReferenceDataBean ref = new ReferenceDataBean();
        ref.connect();

        session.setAttribute("resultsbean", ref);


getServletContext().getRequestDispatcher("/idpayCreateDist.jsp").forward(req
uest, response);
}

But when I make the reference bean a member of the servlet class, allocating
with new in the init() function, I get a null exception.

try
{
        ...

        session.setAttribute("resultsbean", ref);       // ref is a class
attribute


getServletContext().getRequestDispatcher("/idpayCreateDist.jsp").forward(req
uest, response);
}

Does anyone know why?

> ________________________________________________
> Goldman, Sachs & Co.
> 10 Hanover Square 16th Floor | New York, New York 10005
> Tel:  212-902-7887  |  Fax:  212-357-3045
> email:   [EMAIL PROTECTED]
>
> Jay C. Ceron
> Financial Technology Division         Goldman Sachs
>
> __________________________________________________
>
>

___________________________________________________________________________
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