当前位置: 技术问答>java相关
请问ERROR:500是什么错误?
来源: 互联网 发布时间:2015-09-05
本文导语: Location: /music/servlet/shopping.ShoppingServlet Internal Servlet Error: java.lang.NullPointerException at shopping.ShoppingServlet.doPost(ShoppingServlet.java:63) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(Http...
Location: /music/servlet/shopping.ShoppingServlet
Internal Servlet Error:
java.lang.NullPointerException
at shopping.ShoppingServlet.doPost(ShoppingServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
这种类型的错误信息应该从何处着手查错?
Internal Servlet Error:
java.lang.NullPointerException
at shopping.ShoppingServlet.doPost(ShoppingServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
这种类型的错误信息应该从何处着手查错?
|
有这样几点:
1.发布文件夹中的类文件与网页文件更新不匹配.(类文件往往旧)
2.Java文件本身有错.
3.Tomcat服务配置路径有误.
4.没有把需要的类文件放到 '发布目录/lib/' 下.
1.发布文件夹中的类文件与网页文件更新不匹配.(类文件往往旧)
2.Java文件本身有错.
3.Tomcat服务配置路径有误.
4.没有把需要的类文件放到 '发布目录/lib/' 下.
|
HTTP Responses
An HTTP response contains a result code, header fields, and a body.
The HTTP protocol expects the result code and all header fields to be returned before any body content.
Some commonly used status codes include:
404 - indicates that the requested resource is not available.
401 - indicates that the request requires HTTP authentication.
500 - indicates an error inside the HTTP server which prevented it from fulfilling the request.
503 - indicates that the HTTP server is temporarily overloaded, and unable to handle the request.
An HTTP response contains a result code, header fields, and a body.
The HTTP protocol expects the result code and all header fields to be returned before any body content.
Some commonly used status codes include:
404 - indicates that the requested resource is not available.
401 - indicates that the request requires HTTP authentication.
500 - indicates an error inside the HTTP server which prevented it from fulfilling the request.
503 - indicates that the HTTP server is temporarily overloaded, and unable to handle the request.
|
500错肯定是程序有问题,错误在ShoppingServlet.java:63行,java.lang.NullPointerException说明ShoppingServlet.java:63行有一个参加操作的变量是NULL
|
空值
|
at shopping.ShoppingServlet.doPost(ShoppingServlet.java:63)
取不到值
----------------------------------------
==================================================================
注意:此人因发表爱国言论,被斑竹hexiaofen*扣除6分信誉分,问你死未?!
*****************************************************************
取不到值
----------------------------------------
==================================================================
注意:此人因发表爱国言论,被斑竹hexiaofen*扣除6分信誉分,问你死未?!
*****************************************************************