Uday
Bhosle
Manager Products
division
Port2web Inc.
Visit us at www.port2web.com for your customer care
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of [Uday Bhosle] C , Mohana
Sent: Tuesday, October 05, 1999 10:58 AM
To: [EMAIL PROTECTED]
Subject: Re: store info on client side flat file
Hi,
Actually, my requirement boils down to writing some information in the form of a flat text file in the client machine. Can someone tell me how to write into a file on the client machine from a servlet ?
Thanks,
MohanMaintaining client persistence between requests is (I think) a function
of the web server you are using. If you absolutely must be able to
handle clients who have their cookies turned off, I can think of a few
ways:1) Have your servlet write out a bunch of hidden form elements with the
values you need, then put handlers in the receiving pages to read them.2) Have your servlet encode ALL href links with name/value pairs (ie:
<A HREF='nextpage.html?pref=something&who=something+else'>
(make sure you escape special characters like spaces)3) Not really an entirely different option, but use either of the first
two to store a unique key which you create for the client when they log
in, and then write info to this record in a database. This has the
advantage of being persistent as long as you need it (you could put in a
time as well, and decide when they've timed out) but obviously, you need
a db.HTH
