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

Which of the following action variable is used to include a file in jsp?

491


How to run java program in jsp page?

508


What is client side technology?

478


Why is jsp used?

493


What do you know about jsp tags? Explain how you understand the action tag and jsp action elements.

569






What is meant by session management?

481


Can you disable jsp scripting?

518


What is the difference between "JTable" and "JTGrid"? can they be used interchangeably?

1794


Is jsp a programming language?

470


Hi, We developed a webpage using jsp for our team, now we need to know who are employees opening this page,i.e, we need to get the windows user name when ever he/she open the page and stores into a variable. Plz help on this

1849


What is meant by jsp?

510


What is jstl?

531


Can we call destroy method inside init method?

485


How do I mix jsp and ssi #include?

551


How do I perform browser redirection from a jsp page?

497