您的位置:首页 > 理论基础 > 计算机网络

java开发中的HTTP Status 500错误处理

2014-04-12 16:24 288 查看
在我们开发java Web的时候经常会出现很多debug,下面是我在不小心范的错误,要自己看错误信息,从错误信息中找到解决方法,仔细看到底是哪里的原因导致出错。

HTTP Status 500

type Exception reportmessage/a.jsp (line: 1, column: 2) Unterminated <%@ page tagdescriptionThe server encountered an internal error that prevented it from fulfilling this request.exception
org.apache.jasper.JasperException: /a.jsp (line: 1, column: 2) Unterminated <%@ page tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:133)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:503)
org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1779)
org.apache.jasper.compiler.Parser.parse(Parser.java:135)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:119)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:193)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


错误地方:
<%@ page contentType="text/html"; charset="GBK" language="java" errorPage="" %>
从错误报错结果我们可以看出错误所在,原来是在头标签中啊。
改正为:<%@ page contentType="text/html; charset=GBK" language="java" errorPage="" %>
引号的问题。。。。contentType
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  HTTP Status 500