How to set a cookie in JSP?

Answer Posted / anji87543

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

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the standard action?

532


What is a jsp expression?

544


What is an expression language?

511


What is use of scriptlet tags in jsp?

472


How jsp is executed?

460






List down the major differences between the jsp custom tags and java beans.

477


What are advantages of jsp over asp, php, pure servlets and others?

483


How can I implement a thread-safe jsp page?

531


What is the difference between a scrollbar and a scrollpane in jsp?

480


Why do we use expression language in jsp?

467


What is taglibs?

488


What are the different scope values for the tag?

475


What is el?

500


What is c tag in jsp?

486


What is session scope?

505