tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From klas Järgenstedt <k...@jargenstedt.org>
Subject cookies problem...going crazy
Date Sun, 25 May 2003 21:29:48 GMT
Hi

I have this huge problem.
My servlet has this code:
 Cookie cookies[] = request.getCookies();   
    for(int i=0;i<cookies.length;i++){
    -
    -
    -
    }

Problem is that servlet  dies when executing cookies.length;

Errorlog like:
2003-05-23 04:34:27 StandardWrapperValve[pk]: Servlet.service() for 
servlet pk threw exception
java.lang.NullPointerException
        at calender.pk.doGet(pk.java:32)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

pk.java:32 is the line with cookies.length

Looks like my jakarta-tomcat-4.1.10 doesn't want to work with cookies.
Can you help me?

/Klas


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message