code snippet...

"Ceron, Jay" <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.