当前位置:网站首页>Jsp+servlet+mysql案例
Jsp+servlet+mysql案例
2022-07-17 08:57:00 【逍遥游@】
项目名称:个人网站系统
实现技术:jsp+servlet+java+html+css+js;
开发工具:eclipse开发环境:jdk1.8,Tomcat7.0以上。
数据库: mysql5.7
项目描述:本项目是对个人信息描述的一个网站系统,具有网站(前台)和后台管理。具备增删改查的操作,个人信息、留言管理、用户管理三个模块。数据库连接为msyqq
作者的话:
1.jdbcl连接数据库
public class DBUtil {
static String CLASSFORNAME="com.mysql.jdbc.Driver";
static String SERVANDDB="jdbc:mysql://localhost:3306/person?useUnicode=true&characterEncoding=utf-8";
static String USER="root";
static String PWD="123456";
static{
// 加载数据库驱动
try {
Class.forName(CLASSFORNAME);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
public static Connection getConnection() {
Connection conn = null;
try {
// 获取数据库连接
conn = DriverManager
.getConnection(SERVANDDB,
USER, PWD);
}catch (SQLException e) {
e.printStackTrace();
}
return conn;
}
2.登录界面

主界面
留言模块
需要源码及资料的请关注我的微信公众号。

边栏推荐
猜你喜欢
随机推荐
结构体和联合体的区别与联系
[face recognition] face recognition based on histogram histogram with matlab code
为什么别人游戏里的特效都非常柔和
Project code training tutorial
shell-笔记
QR decomposition for matrix inversion -- C engineering implementation
【Port 3000 is already in use,3000端口被占用问题解决方法】
Leetcode sword finger offer II 041 Average value of sliding window: low space consumption solution
Megatexture technology of ID tech5
AuthTalk 第一期预告 | 全面拆解多租户解决方案
ES6 learning function (strict mode, higher-order function, closure)
Unity 使用一张贴图来控制材质主贴图的透明度
Shell notes
Sorting out of neural network basics exercises in the second week of in-depth study
LabVIEW32位与64位的兼容性
cut,sort,uniq,xargs
动态内存管理
QT串口通信
深度学习第一周Introduction to Deep Learning习题整理
JS study note 04-05 - modification of constructor and creation using factory method











