Re: Need help with storing result set

Gokul Singh <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <001101c2f4cd$a9ac9c90$6401a8c0@rambo>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's
> Java Servlet API Technology.
> [mailto:[email protected]] On Behalf Of Tom K
> Sent: Thursday, March 27, 2003 3:46 PM
> To: [email protected]
> Subject: Need help with storing result set
>
>
> I have a servlet that retrieves result set data, and displays
> the data in html format. I would like for the users to be
> able to "check mark" a check box in the displayed html so
> they can retrieve the data later (based on the primary key
> field). Do I store it in a session, a cookie???????

The solution depends upon how you define "later".
A) If it is after many days, even after the session expires, then it has
to be a cookie. The cookie can have the 15 values, or it can be a key
which can point to these values in some sort of persistence
storage(database) on the server side. With a cookie, a user has to
ability to modify the value of a persistant cookie which is being sent
to the server.

B) If it is just for the duration of the HttpSession on the server, you
can put it in the session.

>
> I would only be storing at a maximum 15 key values which are
> 11 digits (long).
>

Rgds,
Gokul

>
> Thanks,
>
> TK

___________________________________________________________________________
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.