HTTP Status 500 – Internal Server Error


Type 异常报告

消息 在 [39] 行处理 [login.jsp] 时发生异常

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

Exception

org.apache.jasper.JasperException: 在 [39] 行处理 [login.jsp] 时发生异常

36: 	String userAgent = request.getHeader("User-Agent");
37: 	//System.out.println("userAgent:" + userAgent);
38: 	boolean isiPad = false;
39: 	if (userAgent.indexOf("iPhone") > -1
40: 			|| userAgent.indexOf("Android") > -1 || userAgent.indexOf("UCWEB") > -1) {
41: 		response.sendRedirect("mh/login.jsp");
42: 		//RequestDispatcher rd = request.getRequestDispatcher("/mh/login.jsp");


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)
	turbomail.gzip.GZIPFilter.doFilter(GZIPFilter.java:31)
	turbomail.web.xss.XSSFilter.doFilter(XSSFilter.java:19)

Root Cause

java.lang.NullPointerException
	org.apache.jsp.login_jsp._jspService(login_jsp.java:170)
	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)
	turbomail.gzip.GZIPFilter.doFilter(GZIPFilter.java:31)
	turbomail.web.xss.XSSFilter.doFilter(XSSFilter.java:19)

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


Apache Tomcat/9.0.30