栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

基于javaweb+jsp的通讯录管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于javaweb+jsp的通讯录管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)

基于javaweb+jsp的通讯录管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)

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等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

            //总页数都小于5,那么end就为总页数的值了。
            this.end = this.totalPage;
        } else {
            //总页数大于5,那么就要根据当前是第几页,来判断start和end为多少了,
            this.start = pageNum - 2;
            this.end = pageNum + 2;
            if (start < 0) {
                //比如当前页是第1页,或者第2页,那么就不如和这个规则,
                this.start = 1;
                this.end = 5;
            }
            if (end > this.totalPage) {
                //比如当前页是倒数第2页或者最后一页,也同样不符合上面这个规则
                this.end = totalPage;
                this.start = end - 5;
                    #{id},
                    #{noticeName},
                    #{noticeText},
                    #{noticeType},
                    #{createDate}
        
    

    
    
        DELETE FROM `t_notice` WHERe `id` IN
        
            #{id}
        
    

    
    
        UPDATE `t_notice`
        
                `id` = #{id},
                `notice_name` = #{noticeName},
                `notice_text` = #{noticeText},
                `notice_type` = #{noticeType},
                `create_date` = #{createDate}
        
        WHERe `id` = #{id}
 * @param 
 */
public class PageBean {
    private List list;//根据条件查询出来的list集合
    private int totalRecord;//根据条件查询出来的数量

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public int getTotalRecord() {
        return totalRecord;
    }

    public void setTotalRecord(int totalRecord) {
        this.totalRecord = totalRecord;
    }

    //--分页逻辑
    //已知数据
    private int pageNum;//当前页,从请求那边传过来。
    private int pageSize;//每页显示的数据条数。
            }
        }
        if (session.getAttribute("loginUser") == null) {
            session.setAttribute("alert_msg", "错误:请先登录!");
            response.sendRedirect("login.jsp");
            return false;
        }
        return true;
    }

	//@Override
    public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {

    }

	//@Override
    public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {

        }
        request.getSession().setAttribute("alert_msg", msg);
        request.getRequestDispatcher("reset_password.jsp").forward(request, response);
    }

    // 返回一个随机颜色(Color对象)
    private Color getRandomColor(int minColor, int maxColor) {
        Random random = new Random();
        // 保存minColor最大不会超过255
        if (minColor > 255)
            minColor = 255;
        //  保存minColor最大不会超过255
        if (maxColor > 255)
            maxColor = 255;
        //  获得红色的随机颜色值
        int red = minColor + random.nextInt(maxColor - minColor);
        //  获得绿色的随机颜色值
        int green = minColor + random.nextInt(maxColor - minColor);
        //  获得蓝色的随机颜色值
        int blue = minColor + random.nextInt(maxColor - minColor);
        return new Color(red, green, blue);
    }
}
    }


<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>



    
    联系人管理
    



        request.getSession().setAttribute("list", pb.getList());

        response.sendRedirect("notice_list.jsp");
    }
}
package com.demo.util;

import java.util.List;


public class PageBean {
    private List list;//根据条件查询出来的list集合
    private int totalRecord;//根据条件查询出来的数量

    public List getList() {
        return list;
        
        
    

    }


<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>



    
    修改联系人
    



            if (isMessyCode(str)) {
                str = new String(str.getBytes("ISO-8859-1"), "UTF-8");
            }
            if (isMessyCode(str)) {
                str = new String(str.getBytes("GB2312"), "UTF-8");
            }
            if (isMessyCode(str)) {
                str = new String(str.getBytes("GBK"), "UTF-8");
            }
            if (isMessyCode(str)) {
                str = new String(str.getBytes("UTF-8"), "ISO-8859-1");
            }
            if (isMessyCode(str)) {
                str = new String(str.getBytes("GB2312"), "ISO-8859-1");
            }
            if (isMessyCode(str)) {
                str = new String(str.getBytes("GBK"), "ISO-8859-1");
            }
            if (isMessyCode(str)) {

运行环境

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…均可修改

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、联系人模块的增删改查管理

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/855505.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号

用户名 姓名 性别 手机 备注 类型 操作
${vo.username}