• 大小: 1.21MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-03
  • 语言: Java
  • 标签:

资源简介

基于java web的简单的学籍管理系统,有数据库。 数据库有4个表。没有MVC架构。适合刚刚进门的jsp程序开发学习! 本人的运行环境是Eclipse EE+tomc7.0+jre1.7+载入的jar包有:msbase.jar、msutil.jar、mysqlserver.jar。mysql数据库密码为123456 代码粗糙,只适合初学者。再次声明! 如下载者有不可解决问题的请联系我QQ邮箱:hezhimingabc@qq.com

资源截图

代码片段和文件信息

import java.sql.*; 
public class ceshilj {
public static void main(String[] args){
String driver =“com.mysql.jdbc.Driver“;
String url =“jdbc:mysql://localhost:3306/hezhiming“;
String user =“root“;
String password =“123456“;
try{
Class.forName(driver);
Connection conn = DriverManager.getConnection(url user password);
if(!conn.isClosed())
System.out.println(“Succeeded connecting to the Database!“);
Statement statement= conn.createStatement();
String sql =“select * from manager“;
ResultSet rs =statement.executeQuery(sql);
String name =null;
 while(rs.next())
{
name = rs.getString(“name“);
String pass = rs.getString(“password“);
name =new String(name.getBytes(“ISO-8859-1“)“GB2312“);
System.out.println(name); 
System.out.println(pass); 
}
 rs.close();
 conn.close(); 
 }catch(ClassNotFoundException e)
{  System.out.println(“Sorrycan‘t find the Driver!“);
 e.printStackTrace(); 
 }catch(SQLException e)
 {  e.printStackTrace(); 
 }catch(Exception e)
{  e.printStackTrace();  }
 }  




 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         983  2016-12-23 05:48  .classpath
     文件        1056  2016-12-22 18:50  .project
     目录           0  2016-12-31 14:15  .settings\
     文件         503  2016-12-22 18:50  .settings\.jsdtscope
     文件          68  2016-12-23 06:56  .settings\org.eclipse.core.resources.prefs
     文件         364  2016-12-22 18:50  .settings\org.eclipse.jdt.core.prefs
     文件         521  2016-12-22 18:50  .settings\org.eclipse.wst.common.component
     文件         345  2016-12-22 18:50  .settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-12-22 18:50  .settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-12-22 18:50  .settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2016-12-31 14:15  build\
     目录           0  2016-12-31 14:15  build\classes\
     文件        2338  2016-12-23 07:36  build\classes\ceshilj.class
     目录           0  2016-12-31 14:15  build\classes\com\
     目录           0  2016-12-31 14:15  build\classes\com\zhiming\
     目录           0  2016-12-31 14:15  build\classes\com\zhiming\SMWeb\
     文件        3725  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\dlbkcj.class
     文件        3708  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\dlcj.class
     文件        3644  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\glydl.class
     文件        3832  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\jsdl.class
     文件        3968  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\scjs.class
     文件        3862  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\sckc.class
     文件        3795  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\scxk.class
     文件        4000  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\scxs.class
     文件        4337  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\tjjs.class
     文件        4554  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\tjkc.class
     文件        4565  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\tjxs.class
     文件        4956  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\xdkc.class
     文件        4249  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\xgglymm.class
     文件        4246  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\xgjsmm.class
     文件        4242  2016-12-23 07:36  build\classes\com\zhiming\SMWeb\xgxsmm.class
............此处省略71个文件信息

评论

共有 条评论