基于javaweb+jsp的学生宿舍管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
开发工具:eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
//提交之前进行检查,如果return false,则不允许提交
function check() {
//根据ID获取值
if (document.getElementById("studentName").value.trim().length == 0) {
alert("姓名不能为空!");
return false;
}
if (document.getElementById("studentNo").value.trim().length == 0) {
alert("学号不能为空!");
return false;
}
if (document.getElementById("studentBuilding").value.trim().length == 0) {
alert("楼栋不能为空!");
return false;
}
if (document.getElementById("studentDormitory").value.trim().length == 0) {
alert("宿舍不能为空!");
return false;
}
if (document.getElementById("studentPhone").value.trim().length == 0) {
alert("电话不能为空!");
public class NoticeController {
@Autowired
private NoticeService noticeService;
/**
* 增加公告
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("noticeAdd")
public void add(HttpServletResponse response, HttpServletRequest request) throws IOException {
Notice vo = new Notice();
public void setList(List<T> list) {
this.list = list;
}
public int getTotalRecord() {
return totalRecord;
}
public void setTotalRecord(int totalRecord) {
this.totalRecord = totalRecord;
}
//--分页逻辑
//已知数据
private int pageNum;//当前页,从请求那边传过来。
private int pageSize;//每页显示的数据条数。
//需要计算得来
1=1
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.demo.dao.UserMapper">
<resultMap id="BaseResultMap" type="com.demo.vo.User" >