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

How can you include the results of another page?

0 Answers  


What is the difference between <jsp:forward> and sendRedirect?

6 Answers   HCL,


Explain the difference between servlet and jsp?

0 Answers  


how to insert star image and need to rate it.. one star two star so on how to do in jsp...????

0 Answers  


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

0 Answers  






how to make a jsp page threadsafe?

2 Answers   Mastek,


What is a page directive?

0 Answers  


What is jsp translation phase?

0 Answers  


What is expression language in jsp?

0 Answers  


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

0 Answers  


What is difference between java and jsp?

0 Answers  


hi i m tannu and i m developing one web site as my project and i have created one chatting application using applet and socket it run perfactly using netbeans5.5 and appletviewer but when i run on browser it doent run i put it class file in jar file then call by jsp when it load in browser it stop on applet started plz help me soon

2 Answers  


Categories