日期:2014-05-18  浏览次数:20715 次

请问为什么不能部署运行啊??
有TreeWiewDemo.war文件   放到webapps文件夹下   运行tomcat   可以自动解压缩   且可以生成CLASS文件,
使用:http://localhost:8080/TreeWiewDemo/dynamicTree.jsp   出现错误如下:

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
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root   cause  

java.lang.NullPointerException
book.treeview.Category.FromDb(Category.java:43)
book.treeview.Category. <init> (Category.java:17)
org.apache.jsp.dynamicTree_jsp._jspService(dynamicTree_jsp.java:60)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


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


这个是为什么

注:运行tomcat界面正常   运行自己写的HELLOWORD的JSP程序正常

本部署文件为征服AJAX那本书中第十四章的示例  


谢谢


------解决方案--------------------
book.treeview.Category.FromDb(Category.java:43)
java.lang.NullPointerException

看这一句啊,空指针
------解决方案--------------------
找到这个代码看看就知道了
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html