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

Can a subsequent request be accessed with one’s servlet code, if a request attribute is already sent in his jsp?

0 Answers  


What are the two types of comments supported by jsp?

0 Answers  


what are the tools used in your project , How to ask the answer this question

0 Answers  


What are jsp el implicit objects and how it’s different from jsp implicit objects?

0 Answers  


Why does _jspService() start with an ‘_’ but other lifecycle methods do not?

0 Answers  






List out some advantages of using jsp.

0 Answers  


How to deactivate el on jsp?

0 Answers  


What is the use of session management?

0 Answers  


what is difference between the contart and implementation?

0 Answers   iFlex,


How can we forward the request from jsp page to the servlet?

0 Answers  


What is welcome file list?

0 Answers  


how to maintain sessions in jsp?can you tellme the methods.

16 Answers   IBM, Scope International, TCS,


Categories