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

What is session tracking?

1266


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

1099


How we can create war file in servlet?

1184


Explain the lifecycle of a servlet?

1028


Can we fetch the attributes related to a servlet on a different servlet?

1200


What is difference between get and post method?

1152


What is the difference in between the httpservlet and generic servlet?

1187


What is the difference between servlet and filter?

1004


Why do we need servlet filter?

1109


Should I override the service() method?

1143


What is meant by a web application

1066


Can servlet have a constructor ?

1100


If some new data has entered the database, explain how can a servlet refresh automatically?

1354


Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

1311


Does servlet have main method?

1244