开发者

null pointer exception in setting response header in servlet

开发者 https://www.devze.com 2022-12-25 15:24 出处:网络
response.setHeader(keys[i].toString(),value); in a servlet is throwing null pointer exception even though none of keys[i] or value 开发者_JAVA技巧are null why is it so?One of the following is true:
response.setHeader(keys[i].toString(),value);

in a servlet is throwing null pointer exception even though none of keys[i] or value 开发者_JAVA技巧are null why is it so?


One of the following is true:

  1. response is null
  2. keys is null
  3. keys[i] is null
  4. the exception is not thrown from the line you posted.
0

精彩评论

暂无评论...
验证码 换一张
取 消