How to set a cookie in JSP?

Answers were Sorted based on User's Feedback



How to set a cookie in JSP?..

Answer / venkat

<%
Cookie mycookie = new Cookie("aName","aValue");
response.addCookie(mycookie);
%>

Is This Answer Correct ?    18 Yes 2 No

How to set a cookie in JSP?..

Answer / anji87543

<%
Cookie mycookie = new Cookie("aName","aValue");
response.addCookie(mycookie);
%>

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More JSP Interview Questions

Give the use of exception object.

0 Answers  


What is directive jsp?

0 Answers  


Where we use assertion in java programming?

2 Answers  


What do you know about pagecontext and what are the advantages of using it?

0 Answers  


What are the components of jsp?

0 Answers  






What is difference between sendredirect and forward?

0 Answers  


How are the jsp requests handled?

0 Answers  


Perform a browser redirection from a jsp page?

0 Answers  


Why is it not necessary to configure standard jsp tags in web.xml?

0 Answers  


Why do we need servlets and jsp?

0 Answers  


can i extend jsp page like other java classes ?

3 Answers  


Why do we use jstl tags?

0 Answers  


Categories