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

What are cookies and how will you use them?

Answer Posted / tulasi vani

Cookies are small bit of textual information that are sent
from the webserver to the browser and sent back from the
browser to the server without changing the data later.

Cookies are helpful during e-commerce sessions when it will
be possible to recoginise a user during a session or it
helps in advertising as we can know the user preferences.

Cookies are created using:

Cookie c=new Cookie("name",value);
response.addCookie(c);

you can retrive the cookie value using:

request.getCookie() which returns a String giving the name
of the cookie and the value associated with the cookie.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a jsp be called using a servlet?

1144


What is the disadvantage of cookies?

997


What do you mean by httpservlet and how it is different from the genericservlet?

1057


What is the servletconfig object?

1045


Which are the different ways you can communicate between servlets?

1001


What is servlet in simple terms?

1025


What are some disadvantages of storing session state in cookies?

1023


What do you mean by cgi?

968


What are sessions in servlets?

1066


What is the use of attribute in servlets?

1048


What is the difference between context parameter and context attribute?

1051


Explain the different ways for servlet authentication?

1103


What is the difference between genericservlet and httpservlet

1097


Difference between get and post in java servlets?

1042


What is meant by session? Tell me something about httpsession class?

1031