GeeCON Prague 2014*
The moose likes Servlets and the fly likes cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "cookies" Watch "cookies" New topic
Author

cookies

Sonal Jogi
Greenhorn

Joined: Oct 19, 2004
Posts: 23
Hi,

Despite checking for the cookie array to be null, the below code throws a nullpointer exception at random (once in 50 times). Could anybody please tell me the reason why?


Thanks in advance,
sonal

[EDIT code tags added by Dave]
[ February 17, 2005: Message edited by: David O'Meara ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The stack trace should state which line the NPE is occuring on.
Post your stack trace.

Also, use the code button to wrap your code. This will preserve the formatting and make it much easier for us to read.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
GeeCON Prague 2014
 
subject: cookies