【求助】jsp页面连接数据库失败 - Java / Java EE
数据库是mysql,TOMCAT的\conf\Catalina\localhost\dd.xml配置如下:
<?xml version="1.0" encoding="GBK"?>
<Context docBase="D:\work\codes\01\aa" debug="0" privileged="true">
<Resource name="jdbc/dstest" auth="Container" type="javax.sql.DataSource"
maxActive="5" maxIdle="2" maxWait="10000"
username="root" password="root"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:8088/j2ee"/>
</Context>
--------------------------------------------------------------------------------
JSP页面报错如下:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
Last packet sent to the server was 0 ms ago.)
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
org.apache
相关问答:
当知道一个日期,如何把这个日期所在旬的前后两个日期取出
比如输入20090905,就输入20090901 20090910
输出20090901 20090910
取得天数后作一下判断再把这个方法用下void set(int field, int value)
......
java swing 程序如何打包成jar,然后可以通过批处理文件bat直接运行,有没有什么工具直接可以完成这两个工作?
用jar打包,把运行需要的jar拷贝到一个目录,批处理用 start javaw -cp .;其他包路径 运行
用zip ......
我是个新手,望高手解答
我现在已经安装了mysql,也有mysql的jdbc。但我怎么配置后,才能在MyEclipse里操作mysql呢?请高手说详细点
打开Myeclipse----window---open perspective---MyEclipse database explorer-- ......
insert into [ScholarshipManagement].[dbo].[department] ([department],[specialization] ,[grade]) output inserted.departmentID values(? ,? ,? )
请问大哥们这个sql 语句应该用Java里的那个数据库操作方法? ......
现在不想用<a> </a> 标签 ,因为点击后会出现页面重定位,给文字加上css样式就可以看起来 是href怎么实现这样的css
text-decoration:underline; cursor:hand;
引用
text-decoration:underline; cur ......