Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why setMaxAge() and getMaxAge() methods are used in Cookies?

Answer Posted / tulasi vani

Cookies are created as

Cookie c=new Cookie(name,value);
c.setMaxAge(milliseconds);

int getMaxAge() returns the maximum age of the cookie.

If the value is set to zero it will be deleted
immediately.If the age is a -ve number it states that the
age of the cookie is confined to that particular request
only.

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is URL Encoding?

1275


What is servletconfig?

1080


What do you mean by httpservlet?

1129


Explain session tracking and its importance?

1053


Difference between java beans & servlets?

1105


What is Client-Server Computing?

2480


How we can get ip address of client in servlet?

1028


If my browser does not support cookie, and my server sends a cookie instance what will happen?

1141


What are the differences between forward() method and sendredirect() methods?

1077


what is servlet chaining?

1150


What is a server side include (ssi)

1232


Write a program to show the functionality of doget and dopost method?

1256


What is the use of send redirect () method?

1145


how many jsp scripting elements are there and what are those?

1060


What are all the protocols supported by httpservlet?

1348