• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question in Cookie ?  RSS feed

 
Vasantha Prabha
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I set cookie in my jsp
Here is my code .But it is throwing error
Cookie cok=new Cookie("UserName",s)
Reponse.addCookie
It is throwing in "Response.addCookie" cannot resolve the symbol
Regards,
Sangeetha
 
Bish Ach
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be specific about uppercase and lowercase. The implecit Object that is available in JSP is "response" not "Response "
 
tushar jayawant
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
the method is public void addCookie(Cookie cookie)
i think there ur are using Response instead of response the implicit object
But why ur are using cookie instead of using the implicit session object
for maintaining the session
Tushar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!