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

How can I handle jsp page errors?

526


What is difference between sendredirect and requestdispatcher?

486


What is contextpath in jsp?

494


What’s the difference between forward and sendredirect?

552


Which tag should be used to pass information from jsp to include jsp?

514






what is the extended star schema

2300


What is jsp index?

487


List out the various scope values of jsp action.

585


Explain jsp?

542


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

1790


Is jsp front end or backend?

496


What is the use of jsp and servlet?

468


What is c tag in jsp?

478


How do you comment out in jsp?

560


How can my application get to know when a httpsession is removed?

545