问答详情
源自:1-11 Servlet获取表单数据

500的原因

HTTP Status 500 – Internal Server Error


Type 异常报告

消息 在 [74] 行处理 [/userinfo.jsp] 时发生异常

描述 服务器遇到一个意外的情况,阻止它完成请求。

Exception

org.apache.jasper.JasperException: 在 [74] 行处理 [/userinfo.jsp] 时发生异常

71:           <td class="content">&nbsp;
72:             <% 
73:                String[] favorites = regUser.getFavorites();
74:                for(String f:favorites)
75:                {
76:             %>
77:                 <%=f%> &nbsp;&nbsp;


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:626)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:515)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

java.lang.NullPointerException
	org.apache.jsp.userinfo_jsp._jspService(userinfo_jsp.java:218)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:477)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

):注意 主要问题的全部 stack 信息可以在 server logs 里查看


提问者:muke的三好学生 2020-02-04 14:47

个回答

  • muke的三好学生
    2020-02-04 15:22:00

    没事了!