基于javaweb+jsp的毕业设计选题答辩管理系统(带报告文档)
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等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
<select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM `t_dabian`
<where>
<if test="searchColumn != null and searchColumn != '' and keyword != null and keyword != ''">
${searchColumn} LIKE CONCAT('%',#{keyword},'%') AND
if>
1=1
where>
ORDER BY id ASC
<if test="startIndex != null and pageSize != null">
LIMIT #{startIndex},#{pageSize};
if>
select>
<select id="getAllCount" parameterType="java.util.Map" resultType="Integer">
SELECT COUNT(*) FROM `t_dabian`
<where>
<if test="searchColumn != null and searchColumn != '' and keyword != null and keyword != ''">
${searchColumn} LIKE CONCAT('%',#{keyword},'%') AND
if>
1=1
where>
select>
<delete id="doRemoveBatch" parameterType="java.util.Collection">
DELETE FROM `t_xuanti` WHERE `id` IN
<foreach collection="list" item="id" separator="," open="(" close=")">
#{id}
foreach>
delete>
<update id="doUpdate" parameterType="com.demo.vo.Xuanti">
UPDATE `t_xuanti`
<set>
<if test ='id != null'>`id` = #{id},if>
<if test ='xuantiName != null'>`xuanti_name` = #{xuantiName},if>
<if test ='xuantiXuesheng != null'>`xuanti_xuesheng` = #{xuantiXuesheng},if>
<if test ='xuantiZhuanye != null'>`xuanti_zhuanye` = #{xuantiZhuanye},if>
<if test ='xuantiZhidaojianshi != null'>`xuanti_zhidaojianshi` = #{xuantiZhidaojianshi},if>
<if test ='xuantiZhuangtai != null'>`xuanti_zhuangtai` = #{xuantiZhuangtai},if>
<if test ='xuantiText != null'>`xuanti_text` = #{xuantiText}if>
set>
public String getDabianShijian() {
return dabianShijian;
}
public void setDabianShijian(String dabianShijian) {
this.dabianShijian = dabianShijian;
}
public String getDabianPichi() {
return dabianPichi;
}
public void setDabianPichi(String dabianPichi) {
this.dabianPichi = dabianPichi;
}
public String getDabianXuesheng() {
return dabianXuesheng;
}
public void setDabianXuesheng(String dabianXuesheng) {
this.dabianXuesheng = dabianXuesheng;
|| ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS);
}
/**
* 判断字符串是否是乱码
*
* @param strName
* @return
*/
public static boolean isMessyCode(String strName) {
java.util.regex.Pattern p = java.util.regex.Pattern.compile("\s*|\t*|\r*|\n*");
java.util.regex.Matcher m = p.matcher(strName);
String after = m.replaceAll("");
String temp = after.replaceAll("\p{P}", "");
char[] ch = temp.trim().toCharArray();
float chLength = 0;
float count = 0;
for (int i = 0; i < ch.length; i++) {
char c = ch[i];
if (!Character.isLetterOrDigit(c)) {
if (!isChinese(c)) {
count = count + 1;
}
public class Util {
/**
* 获取系统当前时间并格式化为字符串
*
* @return
*/
public static String getTime() {
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(System.currentTimeMillis());
}
/**
* 判断字符串是不是中文
*
* @param c
script>
html>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>答辩添加title>
<%@ include file="include/head.jsp" %>
head>
<body>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li><a href="dabianList?">答辩列表a>li>
<li class="active"><a href="#">添加a>li>
ul>
<br/>
<form class="form-horizontal" role="form" action="dabianAdd" method="post" onsubmit="return check()">
<div class="form-group">
<label class="col-sm-3 control-label">答辩组:label>
<div class="col-sm-5">
<input type="text" class="form-control" id="dabianName" name="dabianName">
div>
div>
<div class="form-group">
<label class="col-sm-3 control-label">组长:label>
<div class="col-sm-5">
request.getSession().setAttribute("vo", vo);
String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面
response.sendRedirect("notice_" + to + ".jsp");
}
/**
* 根据条件查询公告的列表并跳转回页面
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("noticeList")
public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
this.redirectList(request, response);
}
str = new String(str.getBytes("ISO-8859-1"), "GBK");
}
if (isMessyCode(str)) {
str = new String(str.getBytes("GB2312"), "GBK");
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(parameterName + "==" + str.trim());
return str.trim();
}
}
package com.demo.vo;
import java.io.Serializable;
/**
* 答辩(t_dabian表对应的Java实体类)
*/
<div class="form-group">
<label class="col-sm-3 control-label">备注:label>
<div class="col-sm-5">
<textarea rows="3" class="form-control" id="userText" name="userText" placeholder="请输入内容......">textarea>
div>
div>
<div class="form-group">
<label class="col-sm-3 control-label">类型:label>
<div class="col-sm-5">
<input name="userType" type="radio" value="管理员" checked="checked"/> 管理员
<input name="userType" type="radio" value="普通用户"/> 普通用户
div>
div>
<div class="form-group">
params.put("searchColumn", searchColumn);//要查询的列
params.put("keyword", keyword);//查询的关键字
Map<String, Object> map = userService.list(params);
request.getSession().setAttribute("list", map.get("list"));
Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页
String pageNum = Util.decode(request, "pageNum");//封装分页参数
com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);
params.put("startIndex", pb.getStartIndex());
params.put("pageSize", pb.getPageSize());
List list = (List) userService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果list
pb.setServlet("userList");
pb.setSearchColumn(searchColumn);
public void setServlet(String servlet) {
this.servlet = servlet;
}
public String getSearchColumn() {
return searchColumn;
}
public void setSearchColumn(String searchColumn) {
this.searchColumn = searchColumn;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
}
package com.demo.util;
import java.sql.Connection;
运行环境
Java≥6、Tomcat≥7.0、MySQL≥5.5
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、答辩模块、选题模块的增删改查管理
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)