各位大神进来看看servlet问题。。。
2013-6-13 14:24:18 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.select_jsp._jspService(select_jsp.java:99)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
-----------------------------
代码区
List qList = null;
try {
qList = zzlMg.getQlistsx();
request.setAttribute("newlist", qList); //保存到request方便前台调用
request.getRequestDispatcher("/select.jsp").forward(request,response);
} catch (
RuntimeException e) {
e.printStackTrace();
throw e;
}
return null;
-----------------------------------------
jsp:
<%
//循环显示数据
List xulist=(List)request.getAttribute("newlist"); // 取request里面的对象队列
System.out.print(xulist.size());
if(xulist.size()!=0){
for(int i=0;i<xulist.size();i++){
pageContext.setAttribute("news",xulist.get(i));
//保存到页面pageContext里面方便下面进行EL表达式调用
%>
<tr>
<td>${news.grade }</td>
<td>${news.courseid }</td>
<td>${news.newterm }</td>
<td>${news.oldgrade }</td>
<td>${news.oldterm }</td>
&nbs