我写一个小程序来学习一下application的实现,可遇到了不少问题。
我用一个html的表单填写数据,设action是一个servlet,然后用该servlet来实现对表单传过来的数据进行存储到application里面,再读取出来,可程序出了以下错误:type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.NullPointerException
java.lang.String.<init>(String.java:147)
imServers.SaveMsg.doPost(SaveMsg.java:80)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
请各位大虾分析一下错误原因,谢谢!