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

Write a simple servlet program to print the contents of html.

1124


What's the difference between authentication and authorization?

1207


Why do we have servlet filters?

1080


What is a server side include (ssi)

1241


What is the structure of the http response

1225


How httpservlet is different from the genericservlet?

1189


When servlet is loaded?

1122


Can we refresh servlet in client and server side automatically?

1110


Can you refresh servlet in client and server-side automatically?

1136


How to generate the server side programming and the advantages of it over the other languages?

1075


What are the functions of the servlet container?

1697


What are different ways for authentication of servlet?

1168


Explain their methods? Tell me their parameter names also have you used threads in servlet?

1101


What is called servlet container?

1154


What is MIME Type?

1205