上机考试的成果,
考试过程惊心动魄,
本以为胜券在握,
没想到出了差错,
还好最后修成正果。
呀!还压上韵了,OK,不搞笑了,谈正事......在对eclipse不熟悉、对javaweb不是很感兴趣的情况之下,不得不应对上机考试,还好最后交上了试卷,有考试时间限制,课下不想再深究,主要是不感兴趣和懒,嗯~~~所以内容不完全,请包涵。简单介绍一下内容吧,主要是通过eclipse对数据库进行操作,涉及到JDBC MySQL,连接数据库,servlet框架, jsp网页+渲染... ...
求求啦!!!关注、收藏+点赞,生活乐趣多一半!!!
文章下面有投票哦!希望大家表达一下看法,我也想从中得到一些慰藉和迷茫的指引,蟹蟹~
目录
学生积分管理
-
预设计功能简介:学生积分数据查询,数据删除,数据添加
-
数据库初始数据截图:
-
项目结构的软件截图:
-
项目结构:
-
实现页面及运行截图:
-
代码粘贴:
-
Index.jsp:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>简单的增删查</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.center-container {
text-align: center;
margin-top: 50px;
}
h1 {
color: #333;
text-transform: uppercase;
margin-bottom: 30px;
}
.action-link {
display: inline-block;
margin: 0 10px;
padding: 10px 20px;
background-color: #007BFF;
color: #fff;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.action-link:hover {
background-color: #0056b3;
}
/*
.modify-link {
display: inline-block;
/* 其他样式可以与 .action-link 相同或不同 */
}
*/
</style>
</head>
<body>
<div class="center-container">
<h1>学生积分的增删查</h1>
<a href="insert.jsp" class="action-link">添加学生积分</a>
<a href="servlet?method=list" class="action-link">删除学生信息</a>
<!--
<a href="servlet?method=modify" class="action-link modify-link">修改</a>
-->
<a href="servlet?method=list" class="action-link">查询学生积分</a>
</div>
</body>
</html>
-
Insert.jsp:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加学生积分</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
h1 {
text-align: center;
color: #333;
}
.center-container {
text-align: center;
margin-top: 20px;
}
form {
margin-top: 20px;
}
form div {