Hi,
See below for reply..


> Hi,
>
> I have used Cookies instead of Session.
> So what is the default Age of a Cookie.
the following is taken from the API docs..
" setMaxAge
 public void setMaxAge(int expiry)

Sets the maximum age of the cookie. The cookie will expire after that many
seconds have passed. Negative values indicate the *default behaviour*: the
cookie is not stored persistently, and will be deleted when the user agent
(web browser) exits. A zero value causes the cookie to be deleted. "

> and what should be ideal age of a Cookie.
Depends upon what are you using the cookie for....

>
> I am getting a timeout after some time
> Also
> Can i store a Full SQL Query in a Cookie.
I think you can do that...

> Right now when i try to store,. it stores only one word i.e SELECT instead
> of the full query.
I think the problem there must be the spaces in your querry.. try to encode
the String having the SQL querry before using the string in the cookie
constructor by using the method java.net.URLEncoder.encode(String) and then
use the method java.net.URLDecoder.decode(String) to get back the sql from
the string from the cookie

regds,
Gokul

___________________________________________________________________________
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