> Hi,
> I have a question.
> I use a dynamic class roading mathod using Class.forName method in my
controll servlet.
> ( there is only one control servlet and many transaction classes)
> At the one stage, I got a client requested parameter through getParameter
method ,
> pass the parameter to my DB , received some data ( Let's call HT ) from
DB and return back a part of data to
> the client. Ath the next stage ( reload a new class ) , if a client
request a more detail data
> then I would like to reuse HT.
> But my problem is whenever the Class reload , the HT becomes null !.
> I would like to know how can I reuse a data even after the class reload at
the dynamic class roading method.
> Any codelet or suggestions appreciates.
>
> Thanks in advance.
>
> youngho
>
The class reload is not the problem here.
Your data (HT) will be lost between requests unless you can store it in the
session object.
HT needs to be Serializable for this to work.
You can then do session.putValue("somekey", HT);
to store it.
HTClass HT = (HTClass)session.getValue("somekey");
gets it back for you.
Hope that helps
Andy Bailey
___________________________________________________________________________
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