首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

HTTP Status 500异常 新手有关问题(jsp+tomcat+sql)

2013-09-11 
HTTP Status 500错误 新手问题(jsp+tomcat+sql)HTTPStatus500typeExceptionreportmessagedescriptionThese

HTTP Status 500错误 新手问题(jsp+tomcat+sql)
HTTP   Status   500
type   Exception   report

message  

description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

org.apache.jasper.JasperException:   Exception   in   JSP:   /left.jsp:117

114:                             <td   width= "47 "   height= "36 "> &nbsp;名称: </td>
115:                             <td   width= "91 "> <%=warename%> </td>
116:                     </tr>
117:             <tr>  
118:                             <td   height= "29 ">   &nbsp;价格: </td>
119:                             <td   height= "29 "> <%=wareprice%> 元 </td>
120:                       </tr>  

Stacktrace:
  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root   cause  

java.lang.NullPointerException
  org.apache.jsp.index_jsp._jspService(index_jsp.java:275)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.5.20   logs.


--------------------------------------------

Apache   Tomcat/5.5.20

[解决办法]
NullPointerException
[解决办法]
空指针错误
也就是你的指针指到了一片空内存
[解决办法]
那就把代码帖详细点 好帮你找找
[解决办法]
P: /left.jsp:117 告诉你这个地方有错误
一般是属于空值异常 ,即
NullPointerException ,很常见的错误。

如果你在 left.jsp这个页面对一些变量或对象进行过操作的话,你可以在操作之前,用 if-else语句判断一下
if(****!=null){

}else{

}

[解决办法]
org.apache.jsp.index_jsp._jspService(index_jsp.java:275)
在你的tomcat目录\work\Catalina\localhost\你的应用名\org\apache\jsp目录下找到index_jsp.java 看看第275行有什么错误,NullPointerException


[解决办法]
指针为空了,在用 <%=warename%> 和 <%=wareprice%> 这种变量时,要首先判断是否为空,然后才能调用它
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行