日期:2014-05-17  浏览次数:20832 次

急求高手指点!!!在做课程设计时遇到问题,迫在眉睫啊。。。
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: An exception occurred processing JSP page /selectcourse.jsp at line 25

22: out.print("<strong><font color=\"red\">");out.print("欢迎&nbsp;&nbsp;</font></strong>");out.print(userId);
23:
24: Collection course = selectcourse.getCourseInfo();
25: Iterator it = course.iterator();
26: while(it.hasNext())
27: {
28:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

java.lang.NullPointerException
org.apache.jsp.selectcourse_jsp._jspService(selectcourse_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
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.18 logs.


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

Apache Tomcat/6.0.18

------解决方案--------------------
空指针问题,你好歹也把代码贴上来吧,这咋看啊!
------解决方案--------------------
25: Iterator it = course.iterator();
这行也发生了错误!
------解决方案--------------------
java.lang.NullPointerException
org.apache.jsp.selectcourse_jsp._jspService(selectcourse_jsp.java:89)

这两句就说明问题了,selectcourse_jsp.java的89行 有空指针错误。
红色的文件不是jsp,是jsp编译之后的servlet文件哦
自己看下。
------解决方案--------------------
course is null
------解决方案--------------------
course is null
我的异常网推荐解决方案:An exception occurred processing JSP page,http://www.aiyiweb.com/j2se/33144.html
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html