Question 1、HTTP Status 500 - Unable to compile class for JSP:'***' cannot be resolved to a type

原因分析:cannot be resolved to a type 基本上是该类没有被识别出来,编译的时候,编译路径下没有该类对应的库文件,

解决方法:

1、拷贝类对应的jar到tomcat lib目录下:C:\Program Files\Java\apache-tomcat-8.0.9\lib

2、关闭tomcat服务器:执行bat文件 C:\Program Files\Java\apache-tomcat-8.0.9\bin\shutdown.bat

3、重新启动tomcat服务器,重新访问页面,该问题现象消失

Question 2、HTTP Status 500 - invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"

原因分析:JSP程序访问mysql数据库,没有正确识别mysql的jdbc驱动,通过检查发现,当前windows系统并未安装mysql的jsp程序驱动

解决方法:

1、下载驱动包:在mysql官网上或者在百度中搜索

2、拷贝mysql-connector-java-5.1.22-bin.jar到apache-tomcat的lib文件夹下(C:\Program Files\Java\apache-tomcat-8.0.9\lib)

3、关闭tomcat服务器:执行bat文件 C:\Program Files\Java\apache-tomcat-8.0.9\bin\shutdown.bat

4、重新启动tomcat服务器,重新访问页面,该问题现象消失

Question 3、HTTP Status 500 - javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException; systemId: jstl:; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。

解决方法:此问题是出现在使用JSP程序访问XML文件的时候,

在使用xml标签前,你必须将XML 和 XPath 的相关包拷贝至你的<Tomcat 安装目录>\lib下:

XercesImpl.jar:下载地址:http://www.apache.org/dist/xerces/j/Xerces-J-tools.2.11.0.zip

xalan.jar:下载地址: http://mirrors.cnnic.cn/apache/xalan/xalan-j/binaries/xalan-j_2_7_2-bin.zip

添加xml的jar库文件之后:现象消失。

Question 4、HTTP Status 500 - javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException; systemId: jstl:; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

产生异常的运行代码:

 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>XML Data(JSTL x:parse Tags)</title>
</head>
<body>
<h3>Books Information</h3>
<c:import var="bookinfo" url="http://localhost:8080/SimpleJspWeb/books.xml"/>
<x:parse xml="$(bookinfo)" var="output"/>
<b>The title of the first book is</b>:
<x:out select="$output/books/book[1]/name"/>
<br>
<b>The price of the second book is</b>;
<x:out select="$output/books/book[2]/price"/>
</body>
</html>

问题原因:<x:parse xml="$(bookinfo)" var="output"/> 中的xml内容编写错误,括号使用错误,正确的应该是中括号。如下:
<x:parse xml="${bookinfo}" var="output"/>

参考:

http://blog.sina.com.cn/s/blog_6d5d8b580100txon.html

http://blog.csdn.net/jaysuper/article/details/5824138

Question 5、XML文件告警:No grammar constraints (DTD or XML Schema) referenced in  the document.

在XML文件头添加:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/2002/xmlspec/dtd/2.10/xmlspec.dtd">

Question 6、HTTP Status 500 - /CustomTag.jsp (line: 11, column: 1) The TLD for the class com.tutorialspoint.HelloTag specifies an invalid body-content (JSP) for a SimpleTag.

原因很明显:在HelloTag类中指定了一个不可用的的body-content(JSP),检查相应的tld文件,发现未设置body-content属性。在tld文件中添加以下代码:

<body-content>empty</body-content>

Question 7

未完待续。。。

【FAQ】【JSP】HTTP Status 500 - Summary(问题排查时候应该仔细分析所有的错误打印说明)的更多相关文章

  1. HTTP Status 500 - DateConverter does not support default String to 'Date' conversion.错误

    //自己指定一个类型转换器(将String转成Date) DateConverter converter = new DateConverter(); converter.setPattern(new ...

  2. HTTP Status 500 - An exception occurred processing JSP page /WEB-INF

    HTTP Status 500 - An exception occurred processing JSP page /WEB-INF/test/showCountry.jsp at line 11 ...

  3. jsp调用javabean出现错误HTTP Status 500 - Unable to compile class for JSP

    HTTP Status 500 - Unable to compile class for JSP:   type Exception report message Unable to compile ...

  4. HTTP Status 500 - The absolute uri: http://java.sun.com/jsp/jstl/core cannot-报错解决方法

    操作:jsp文件里面添加<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"   % ...

  5. Tomcat连HBase报错: HTTP Status 500 - java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext

    Tomcat中连接HBase数据库,启动的时候报错: HTTP Status 500 - java.lang.AbstractMethodError: javax.servlet.jsp.JspFac ...

  6. HTTP Status 500 - An exception occurred processing at line 35

    HTTP Status 500 - An exception occurred processing JSP page /manage/addCategory.jsp at line 35 type ...

  7. 连接mongo的服务提示:HTTP Status 500 - com.mongodb.MongoException$Network: can't call something

    连接mongo的服务提示以下错误 原因:达到了mongodb启动时预设的最大连接数,无法创建新的连接 HTTP Status 500 - com.mongodb.MongoException$Netw ...

  8. jsp HTTP Status 405 - HTTP method GET is not supported by this URL

    package myservlet.control; import java.io.IOException; import java.io.PrintWriter; import javax.serv ...

  9. Spring MVC 使用问题与解决--HTTP Status 500 - Servlet.init() for servlet springmvc threw exception

    1.HTTP Status 500 - Servlet.init() for servlet springmvc threw exception 解决 使用jre1.7 Spring4.3 2.spr ...

随机推荐

  1. ORA-01461: 仅可以为插入 LONG 列的 LONG 值赋值”解决办法

    ORA-01461: 仅可以为插入 LONG 列的 LONG 值赋值”解决办法 今天遇到的一个问题: 直接修改数据表中的某些字段数据内容时报错: ORA-01461: 仅可以为插入 LONG 列的 L ...

  2. Android开发-API指南-<action>

    <action> 英文原文:http://developer.android.com/guide/topics/manifest/action-element.html 采集(更新)日期: ...

  3. nginx 代理配置文件实例

    安装NGINX前要先安装PCRE正则表达式库: ./configure --prefix=/usr/local/pcre 出现以下错误  (一般./configure即可, 笔者这里是直接./conf ...

  4. hadoop的live node为0

    1.重新格式化namenode cd ~ rm -rf name mkdir name rm -rf hadoop-2.7.2/logs/ mkdir hadoop-2.7.2/logs/ hadoo ...

  5. javascript代码复用模式

    代码复用有一个著名的原则,是GoF提出的:优先使用对象组合,而不是类继承.在javascript中,并没有类的概念,所以代码的复用,也并不局限于类式继承.javascript中创建对象的方法很多,有构 ...

  6. js控制div颜色

    <html><head></head><style>#div1{width:400px;height:400px;background-color:re ...

  7. 十七、OGNL表达式

    十七.OGNL OGNL简介: OGNL是对象导航图语言.它是一个独立的项目.早期的webwork框架用到了OGNL作为自己的表达式语言, 所以struts2也是用OGNL作为表达式语言,当然也可以使 ...

  8. 条款19 command 模式与好莱坞法则

    当一个函数对象被当做回调时候,就是一个command模式的实例 什么是回调? 回调就是框架知道什么时候干一些事情,但是具体干什么,或许框架一无所知(因为回调函数不是他设计的),而用户则知道发生一个特定 ...

  9. 运行ipython后显示WARNING: IPython History requires SQLite, your history will not be saved

    在CentOS6.5下将自带的python2.6升级到python2.7,并安装了ipython,启动ipython后显示如下信息: WARNING: IPython History requires ...

  10. 自定义Attribute 服务端校验 客户端校验

    MVC 自定义Attribute 服务端校验 客户端校验/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) *//* Autho ...