How to set a cookie in JSP?

Answer Posted / venkat

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

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is jsp used for?

493


Is jsp page extensible true false?

490


Which tags are used for bean development?

473


What is difference between html and jsp?

491


Which attribute specifies a jsp page that should process any exceptions thrown but not caught in the current page? : Citibank

511






What is server context?

491


What is the use of implicit object named "application" in Application?

1246


What are custom tags?

470


Tell us about the stages (phases) of the jsp life cycle.

489


What is jsp translation time?

503


Which jsp methods can be overridden?

512


How do I mix jsp and ssi #include? What is the difference between include directive & jsp:include action?

505


Which package does a jsp api consist of?

485


What is the standard action?

515


How do I save a jsp file?

494