• 大小: 11KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-17
  • 语言: Java
  • 标签: 留言版  

资源简介

网站留言版系统 留言版的实现代码 大家学习参考下

资源截图

代码片段和文件信息

package com.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class baseDao {
public static String DRIVER=“com.microsoft.jdbc.sqlserver.SQLServerDriver“;
public static String URL=“jdbc:microsoft:sqlserver://localhost:1433;databaseName=Test“;

private Connection conn=null;
private Statement stmt=null;
private ResultSet rs=null;

public Connection getConn(){

try{
Class.forName(DRIVER);
conn=DriverManager.getConnection(URL“sa““sa“);

}catch(Exception e){
e.printStackTrace();
}
return conn;
}

public void closeAll(ResultSet rsStatement stmtConnection conn){
try{
if(rs!=null){
rs.close();
}
if(stmt!=null){

stmt.close();
}
if(conn!=null){
conn.close();
}



}catch(Exception e){
e.printStackTrace();
}

}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        404  2009-05-18 08:31  PublisherMessage\.classpath

     文件        321  2009-07-05 17:46  PublisherMessage\.mymetadata

     文件       1234  2009-05-18 08:54  PublisherMessage\.project

     文件        914  2009-05-18 08:35  PublisherMessage\src\com\dao\baseDao.java

     文件        218  2009-05-18 09:35  PublisherMessage\src\com\dao\MessageDao.java

     文件       2302  2009-05-19 15:29  PublisherMessage\src\com\dao\MessageImpl.java

     文件        830  2009-05-18 08:34  PublisherMessage\src\com\entity\Message.java

     文件       1403  2009-05-19 14:52  PublisherMessage\WebRoot\doPost.jsp

     文件       3279  2009-07-05 18:21  PublisherMessage\WebRoot\index.jsp

     文件         39  2009-05-18 08:29  PublisherMessage\WebRoot\meta-INF\MANIFEST.MF

     文件       2326  2007-08-17 11:17  PublisherMessage\WebRoot\style\style.css

     文件       1519  2009-05-25 08:16  PublisherMessage\WebRoot\WEB-INF\classes\com\dao\baseDao.class

     文件        218  2009-05-25 08:16  PublisherMessage\WebRoot\WEB-INF\classes\com\dao\MessageDao.class

     文件       3163  2009-05-25 08:16  PublisherMessage\WebRoot\WEB-INF\classes\com\dao\MessageImpl.class

     文件       1301  2009-05-25 08:16  PublisherMessage\WebRoot\WEB-INF\classes\com\entity\Message.class

     文件        375  2009-05-18 08:29  PublisherMessage\WebRoot\WEB-INF\web.xml

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\WEB-INF\classes\com\dao

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\WEB-INF\classes\com\entity

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\WEB-INF\classes\com

     目录          0  2009-07-10 13:20  PublisherMessage\src\com\dao

     目录          0  2009-07-10 13:20  PublisherMessage\src\com\entity

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\WEB-INF\classes

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\WEB-INF\lib

     目录          0  2009-07-10 13:20  PublisherMessage\src\com

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\meta-INF

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\style

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot\WEB-INF

     目录          0  2009-07-10 13:20  PublisherMessage\.myeclipse

     目录          0  2009-07-10 13:20  PublisherMessage\src

     目录          0  2009-07-10 13:20  PublisherMessage\WebRoot

............此处省略4个文件信息

评论

共有 条评论