本篇文章将会列举以后再开发过程中出现的各种坑
1.代号:500 org.apache.jasper.JasperException
出现的警示:严重: Servlet.service() for servlet [jsp] in context with path [/AjaxDemo02] threw exception [/index.jsp (line: [1], column: [61]) quote symbol expected] with root cause
根据提示查找原因:原来是我的jsp第一行多了一个双引号,导致apache不能正确解析jsp文件。
错点:
<%@ page language="java" contentType="text/html;charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
contentType="text/html;charset=ISO-8859-1"
//contentType=" ..."中有两个参数,我把它变成两个不同的key-value类型
2.解决:Connections could not be acquired from the underlying database!
以上问题可能有一下原因造成:
1,驱动配置有误:driver=com.mysql.jdbc.Driver
2,数据库连接地址有误:url=jdbc:mysql://localhost:3306/test?3useUnicode=true&characterEncoding=utf8
3,密码或帐号有误:username=root
password=root
4,数据库未启动或无权访问
5,项目未引入对应的驱动jar包mysql-connector-java-5.1.6-bin.jar
6,mysql root没有远程访问的权限,需要增加权限,增加权限的步骤如下:
进入mysql数据库:
grant all privileges on . to ‘root’@’%’ identified by ‘root’ with grant option;
flush privileges;