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 / sandeep m

Cookie is a key value pair stored by server at client side
for session tracking any other related use.

Cookie class is available in javax.servlet.http package.
cookies can be retrieved from
javax.servlet.http.HttpServletRequest object using
getCookies() method.

getCookies() returns Cookie[] array object. Any number of
Cookies can be stored on response object.

cookie can be added to
javax.servlet.http.HttpServletResponse object. using
resp.addCookie(new Cookie("key","value"));

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a hello world program using servlets.

1046


Describe in brief RequestDespatcher?

1122


What are the different mode that servlets can be used?

1006


How can the referrer and the target urls be used in servlet?

994


Tell us something about servletconfig interface.

985


How a servlet is unloaded?

1076


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

1026


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

2769


List the Different types of servlet?

1026


Why the concept of single thread model interface is used?

986


Difference between httpservlet and generic servlets?

1092


What is the major difference between context parameter and context attribute?

1094


What is servlet container?

1104


If a servlet is not properly initialized, what exception may be thrown?

1174


What is servlet lazy loading?

1152