JSP中空指针异常,就是说有变量是null
HTTP 500 是HTTP协议中定义的一种错误代码,一般是说明服务器端程序出错了。
当你的JSP或者Servlet抛出异常,那么Servlet容器就会对HTTP请求返回500代码
你可以在JSP或Servlet中调用response.setStatus(int code);和response.sendError(String msg)
比如,
if(a == null){
response.setStatus(500);
response.sendError("a is null");
}
这不是空指针错误吗?程序中哪里写错了吧。要看代码才知道。
空值错误,很头疼啊,得慢慢找!