• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp Cookie Exception  RSS feed

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to print the value of a cookie thats set in the servlet I am getting a Jasper Exception and a NullPointerException exception with root cause showing at the forward method of RequestDispatcher.

This is my servlet code


JSP Code



[ October 05, 2005: Message edited by: vishnu prakash ]
[ October 05, 2005: Message edited by: vishnu prakash ]
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got the solution. There is no problem with the code. But there is strange behavior with the System. All of a sudden cookies are not accepted by the system which results in NullPointerException. I couldn't figure out why this strange thing is happening. :roll:
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am assuming this is just a typo "getKookies();"
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it's NOT. I was asked to do in that way by JavaRanch.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you're trying to create them and then read them back before the response is ever sent to the browser.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!