Model2的基本结构「建议收藏」

Model2的基本结构「建议收藏」DBConnection.javaUser.javaUserDAO.javaUserDAOImpl.javaPasswordError.javaUserLoginServlet.javau

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

DBConnection.java

package com.dorra.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class DBConnection {
    private static final String DBDRIVER = "com.mysql.jdbc.Driver";//驱动类类名
    private static final String DBURL = "jdbc:mysql://localhost:3306/bank?useUnicode=true&characterEncoding=UTF-8";//连接URL
    private static final String DBUSER = "root";//数据库用户名
    private static final String DBPASSWORD = "admin";//数据库密码
    
    public static Connection getConnection(){
        Connection conn = null;//声明一个连接对象
        try{
            Class.forName(DBDRIVER);//注册驱动;获得连接对象
            conn = DriverManager.getConnection(DBURL, DBUSER, DBPASSWORD);
        }catch(ClassNotFoundException e){
            e.printStackTrace();
        }
        catch(SQLException e){
            e.printStackTrace();
        }
        return conn;
    }
    
    public static void close(Connection conn){//接受一个参数conn,该参数为需要关闭的连接对象。该方法将关闭该连接对象
        if(conn != null){
            try{
                conn.close();//关闭conn连接对象
            }catch(SQLException e){
                e.printStackTrace();
            }
        }
    }
    
    public static void close(PreparedStatement pstmt){//接受一个参数pstmt,该参数为需要关闭预处理对象。该方法将关闭该预处理对象
        if(pstmt != null){
            try{
                pstmt.close();//关闭pstmt预处理对象
            }catch(SQLException e){
                e.printStackTrace();
            }
        }
    }
    
    public static void close(ResultSet rs){//接受一个参数rs,该参数为需要关闭结果集对象。该方法将关闭该结果集对象
        if(rs != null){
            try{
                rs.close();//关闭rs结果集对象
            }catch(SQLException e){
                e.printStackTrace();
            }
        }
    }
}

User.java

package com.dorra.bean;

public class User {
    private String userName;//储户姓名
    private String userId;//储户身份证号码
    private String sex;//储户性别
    private String userArea;//储户地址
    private String userTel;//储户电话
    
    public String getUserName() {
        return userName;
    }
    
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public String getUserId() {
        return userId;
    }
    
    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getUserArea() {
        return userArea;
    }

    public void setUserArea(String userArea) {
        this.userArea = userArea;
    }
    
    public String getUserTel() {
        return userTel;
    }

    public void setUserTel(String userTel) {
        this.userTel = userTel;
    }
    
}

UserDAO.java

package com.dorra.dao;

import java.util.List;

import com.dorra.bean.User;

public interface UserDAO {
    public boolean addUser(User user);            //实现添加储户的方法
    
    public boolean deleteUser(String userId);    //实现删除储户的方法
    
    public boolean updateUser(User user);        //实现更新储户个人信息的方法
    
    public List<User> findAllUser();            //实现查询所有储户的方法
    
    public User findUserById(String userId);    //实现按ID查询储户的方法
    
    public User userLogin(String userName,String userId);//储户登录
}

UserDAOImpl.java

package com.dorra.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import com.dorra.bean.User; import com.dorra.util.DBConnection; import com.dorra.exception.IdHaveExist; import com.dorra.exception.NameHaveExist; import com.dorra.exception.NameNotFound; import com.dorra.exception.PasswordError; public class UserDAOImpl implements UserDAO { //实现添加储户的方法 public boolean addUser(User user) { Connection conn = DBConnection.getConnection(); //获得连接对象 boolean flag = false; String addSQL = "insert into user(userName,userId,sex,userArea,userTel) " + "values(?,?,?,?,?)"; PreparedStatement pstmt = null; //声明预处理对象 try { String sql1 = "select * from user where userName = '" + user.getUserName() + "'"; String sql2 = "select * from user where userId = '" + user.getUserId() + "'"; if(DB.selectMsg(sql1)){ throw new NameHaveExist("注册失败,储户名已存在!!"); }else if(DB.selectMsg(sql2)){ throw new IdHaveExist("注册失败,已用该身份证号注册过,请直接登录!!"); }else{ pstmt = conn.prepareStatement(addSQL); //获得预处理对象并赋值 pstmt.setString(1, user.getUserName()); //设置第一个参数 pstmt.setString(2, user.getUserId()); //设置第二个参数 pstmt.setString(3, user.getSex()); //设置第三个参数 pstmt.setString(4, user.getUserArea()); //设置第四个参数 pstmt.setString(5, user.getUserTel()); //设置第五个参数  int i = pstmt.executeUpdate(); //执行更新 if(i != 0){//添加成功 flag = true; } } } catch(IdHaveExist ihe){ throw ihe; } catch(NameHaveExist nhe){ throw nhe; } catch (SQLException e) { e.printStackTrace(); } finally{ DBConnection.close(pstmt); //关闭预处理对象 DBConnection.close(conn); //关闭连接对象  } return flag; } //实现删除储户的方法 public boolean deleteUser(String userId) { Connection conn = DBConnection.getConnection(); //获得连接对象 boolean flag = false; String deleteSQL = "delete from user where userId=?"; PreparedStatement pstmt = null; //声明预处理对象 try { pstmt = conn.prepareStatement(deleteSQL); //获得预处理对象并赋值 pstmt.setString(1, userId); //设置第一个个参数 int i = pstmt.executeUpdate(); //执行更新 if(i != 0){ flag = true; } } catch (SQLException e) { e.printStackTrace(); } finally{ DBConnection.close(pstmt); //关闭预处理对象 DBConnection.close(conn); //关闭连接对象  } return flag; } //实现更新储户个人信息的方法 public boolean updateUser(User user) { Connection conn = DBConnection.getConnection(); //获得连接对象 boolean flag = false; String updateSQL = "update user set userName=?," + "sex=?,userArea=?,userTel=? where userId=?"; PreparedStatement pstmt = null; //声明预处理对象 try { pstmt = conn.prepareStatement(updateSQL); //获得预处理对象并赋值 pstmt.setString(1, user.getUserName()); //设置第一个参数 pstmt.setString(2, user.getSex()); //设置第二个参数 pstmt.setString(3, user.getUserArea()); //设置第三个参数 pstmt.setString(4, user.getUserTel()); //设置第四个参数 pstmt.setString(5, user.getUserId()); //设置第五个参数 int i = pstmt.executeUpdate(); //执行更新 if(i != 0){ flag = true; } } catch (SQLException e) { e.printStackTrace(); } finally{ DBConnection.close(pstmt); //关闭预处理对象 DBConnection.close(conn); //关闭连接对象  } return flag; } //实现查询所有储户的方法 public List<User> findAllUser() { Connection conn = DBConnection.getConnection(); //获得连接对象 String sql = "select * from user"; PreparedStatement pstmt = null; //声明预处理对象 List<User> userList = new ArrayList<User>(); try { pstmt = conn.prepareStatement(sql); //获得预处理对象并赋值 ResultSet rs = pstmt.executeQuery(); //执行查询 while(rs.next()) { User user = new User(); //实例化 user.setUserName(rs.getString(1)); user.setUserId(rs.getString(2)); user.setSex(rs.getString(3)); user.setUserArea(rs.getString(4)); user.setUserTel(rs.getString(5)); userList.add(user); } } catch (SQLException e) { e.printStackTrace(); } finally{ DBConnection.close(pstmt); //关闭预处理对象 DBConnection.close(conn); //关闭连接对象  } return userList; //返回查询到的所有储户  } //实现按ID查询储户的方法 public User findUserById(String userId) { Connection conn = DBConnection.getConnection(); //获得连接对象 String sql = "select * from user where userId = ?"; PreparedStatement pstmt = null; //声明预处理对象 User user = new User(); try { pstmt = conn.prepareStatement(sql); //获得预处理对象并赋值 pstmt.setString(1, userId); //设置参数 ResultSet rs = pstmt.executeQuery(); //执行查询 if(rs.next()) { user.setUserName(rs.getString(1)); user.setUserId(rs.getString(2)); user.setSex(rs.getString(3)); user.setUserArea(rs.getString(4)); user.setUserTel(rs.getString(5)); } } catch (SQLException e) { e.printStackTrace(); } finally{ DBConnection.close(pstmt); //关闭预处理对象 DBConnection.close(conn); //关闭连接对象  } return user; } //储户登录 public User userLogin(String userName,String userId){ Connection conn = DBConnection.getConnection(); //获得连接对象 String sql = "select * from user where userName = ?"; PreparedStatement pstmt = null; //声明预处理对象 User user = new User(); try { pstmt = conn.prepareStatement(sql); //获得预处理对象并赋值 pstmt.setString(1, userName); //设置参数 ResultSet rs = pstmt.executeQuery(); //执行查询 if(rs.next()) { if(!userId.equals(rs.getString("userId"))){ throw new PasswordError("身份证不正确!!"); }else{//登录成功 user.setUserName(rs.getString(1)); user.setUserId(rs.getString(2)); user.setSex(rs.getString(3)); user.setUserArea(rs.getString(4)); user.setUserTel(rs.getString(5)); return user; } }else{ throw new NameNotFound("储户名不存在,请先注册再登录!!"); } } catch(NameNotFound nnf) { throw nnf; } catch (PasswordError pe) { throw pe; } catch (SQLException e) { e.printStackTrace(); } finally{ DBConnection.close(pstmt); //关闭预处理对象 DBConnection.close(conn); //关闭连接对象  } return user; } }

PasswordError.java

package com.dorra.exception; public class PasswordError extends RuntimeException { public PasswordError(String message) { super(message); } }

UserLoginServlet.java

package com.dorra.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.dorra.bean.User; import com.dorra.dao.UserDAO; import com.dorra.dao.UserDAOImpl; import com.dorra.exception.NameNotFound; import com.dorra.exception.PasswordError; public class UserLoginServlet extends HttpServlet { /** * Constructor of the object. */ public UserLoginServlet() { super(); } /** * The doGet method of the servlet. <br> * * This method is called when a form has its tag value method equals to get. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request,response); } /** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to post. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); HttpSession session=request.getSession(true); String userName = request.getParameter("userName"); String userId = request.getParameter("userId"); User user1 = new User(); user1.setUserName(userName); user1.setUserId(userId); try{ UserDAO ud = new UserDAOImpl(); User user = ud.userLogin(userName, userId); session.setAttribute("user", user); session.setAttribute("message", ""); request.getRequestDispatcher("userConter.jsp").forward(request, response); }catch(NameNotFound nnf) { request.setAttribute("message", nnf.getMessage()); request.getRequestDispatcher("userLogin.jsp").forward(request, response); } catch(PasswordError pe) { request.setAttribute("message", pe.getMessage()); request.getRequestDispatcher("userLogin.jsp").forward(request, response); } catch (Exception e) { e.printStackTrace(); } } }

userLogin.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>储户登录</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; overflow:hidden; } .STYLE3 {color: #528311; font-size: 12px; } .STYLE4 {color: #42870a; font-size: 12px; } --> </style> <script language="javascript" src="js/trim.js"></script> <script language="javascript"> function checkUserId(){ var flag = false; var userId = document.getElementById("userId"); var zzs=/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/; if(userId.value.trim()==""){ document.all.fo.innerHTML = "<font color='red' size='2px'>身份证号码不能为空.</font>"; }else if(!zzs.test(userId.value)){ document.all.fo.innerHTML = "<font color='red' size='2px'>身份证号必须是18位且数字+字母.</font>"; }else{ flag = true; document.all.fo.innerHTML = "<font size='2px'>符合要求.</font>"; } return flag; } function checkUserName(){ var flag = false; var userName = document.getElementById("userName"); var zzs = /[@#\$%\^&\*]+/g; if(userName.value.trim()==""){ document.all.info.innerHTML = "<font color='red' size='2px'>储户名不能为空.</font>"; }else if(zzs.test(userName.value)){ document.all.info.innerHTML = "<font color='red' size='2px'>不能含有非法字符.</font>"; }else{ flag = true; document.all.info.innerHTML = "<font size='2px'>符合要求.</font>"; } return flag; } function checkSub(){ var flag1 = checkUserName(); var flag2 = checkUserId(); if(flag1&&flag2){ document.form.submit(); }else{alert("您输入的格式存在错误!!");} } </script> </head> <body style="margin:auto;text-align:center;background-image:url('images/bg.gif')"> <div style="width:439px;height:275px; margin-top:100px; margin-left:auto; margin-right:auto;"> <form action="UserLoginServlet" method="post" name="form" id="form"> <table style="width:439px;height:275px;font-size:12px;background-image:url('images/login.jpg');"> <tr> <td height="80" colspan="3"> <h1><font color="red">储户登录</font></h1> </td> </tr> <tr> <td height="10" colspan="3"> </td> </tr> <tr> <td align="right" id="info" width="180px"></td> <td width="70px">储户名:</td> <td width="130px"><input type="text" id="userName" name="userName" onblur="checkUserName()" style="height:16px; width:100px; border:solid 1px #cadcb2; font-size:12px; color:#81b432;"></td> </tr> <tr> <td align="right" id="fo" width="180px"></td> <td>身份证号:</td> <td><input type="text" id="userId" name="userId" onblur="checkUserId()" style="height:16px; width:100px; border:solid 1px #cadcb2; font-size:12px; color:#81b432;"></td> </tr> <tr> <td></td> <td></td> <td align="left"> <input type="submit" value="登录" onclick="checkSub()" />&nbsp; <input type="reset" value="重置" /> </td> </tr> <tr> <td><a href="userRegister.jsp">还未注册?注册点击这里注册.</a></td> </tr> <tr> <td colspan="3" style="color: red;align:right;">${message}</td> </tr> <tr> <td colspan="3" align="center"><a href="adminLogin.jsp">后台登录</a></td> </tr> </table> </form> </div> </body> </html>

 web.xml

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>UserAddServlet</servlet-name> <servlet-class>com.dorra.servlet.UserAddServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>userLoginServlet</servlet-name> <servlet-class>com.dorra.servlet.userLoginServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>UserLoginServlet</servlet-name> <servlet-class>com.dorra.servlet.UserLoginServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>UserRegisterServlet</servlet-name> <servlet-class>com.dorra.servlet.UserRegisterServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>AddAccountServlet</servlet-name> <servlet-class>com.dorra.servlet.AddAccountServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>AllAccountServlet</servlet-name> <servlet-class>com.dorra.servlet.AllAccountServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>DeleteAccountServlet</servlet-name> <servlet-class>com.dorra.servlet.DeleteAccountServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>AccountDetailServlet</servlet-name> <servlet-class>com.dorra.servlet.AccountDetailServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>UpdateUserServlet</servlet-name> <servlet-class>com.dorra.servlet.UpdateUserServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>AccountHandleServlet</servlet-name> <servlet-class>com.dorra.servlet.AccountHandleServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>UpdateAccountPasswordServlet</servlet-name> <servlet-class>com.dorra.servlet.UpdateAccountPasswordServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>CheckPasswordServlet</servlet-name> <servlet-class>com.dorra.servlet.CheckPasswordServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>DepositMoneyServlet</servlet-name> <servlet-class>com.dorra.servlet.DepositMoneyServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>WithdrawMoneyServlet</servlet-name> <servlet-class>com.dorra.servlet.WithdrawMoneyServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>InquireMoneyServlet</servlet-name> <servlet-class>com.dorra.servlet.InquireMoneyServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>InquireAcchistoryServlet</servlet-name> <servlet-class>com.dorra.servlet.InquireAcchistoryServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>DeleteAcchistoryServlet</servlet-name> <servlet-class>com.dorra.servlet.DeleteAcchistoryServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>AdminLoginServlet</servlet-name> <servlet-class>com.dorra.servlet.AdminLoginServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>AllUserServlet</servlet-name> <servlet-class>com.dorra.servlet.AllUserServlet</servlet-class> </servlet> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>DeleteUserServlet</servlet-name> <servlet-class>com.dorra.servlet.DeleteUserServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>UserAddServlet</servlet-name> <url-pattern>/UserAddServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>userLoginServlet</servlet-name> <url-pattern>/userLoginServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>UserLoginServlet</servlet-name> <url-pattern>/UserLoginServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>UserRegisterServlet</servlet-name> <url-pattern>/UserRegisterServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AddAccountServlet</servlet-name> <url-pattern>/AddAccountServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AllAccountServlet</servlet-name> <url-pattern>/AllAccountServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>DeleteAccountServlet</servlet-name> <url-pattern>/DeleteAccountServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AccountDetailServlet</servlet-name> <url-pattern>/AccountDetailServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>UpdateUserServlet</servlet-name> <url-pattern>/UpdateUserServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AccountHandleServlet</servlet-name> <url-pattern>/AccountHandleServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>UpdateAccountPasswordServlet</servlet-name> <url-pattern>/UpdateAccountPasswordServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>CheckPasswordServlet</servlet-name> <url-pattern>/CheckPasswordServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>DepositMoneyServlet</servlet-name> <url-pattern>/DepositMoneyServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>WithdrawMoneyServlet</servlet-name> <url-pattern>/WithdrawMoneyServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>InquireMoneyServlet</servlet-name> <url-pattern>/InquireMoneyServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>InquireAcchistoryServlet</servlet-name> <url-pattern>/InquireAcchistoryServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>DeleteAcchistoryServlet</servlet-name> <url-pattern>/DeleteAcchistoryServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AdminLoginServlet</servlet-name> <url-pattern>/AdminLoginServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AllUserServlet</servlet-name> <url-pattern>/AllUserServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>DeleteUserServlet</servlet-name> <url-pattern>/DeleteUserServlet</url-pattern> </servlet-mapping> </web-app>

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/167927.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • bootoption没有启动项_javacontinue的用法

    bootoption没有启动项_javacontinue的用法一、现象从fetch说起,用fetch构造一个POST请求。1fetch(‘http://127.0.0.1:8000/api/login’,{2method:”POST”,3headers:({4’Content-Type’:’application/x-www-form-urlencoded’5}),6body:”name=”+name…

    2022年10月30日
  • Linux中密码登录redis客户端

    Linux中密码登录redis客户端#redis一、查找redis服务ps-ef|grepredis5061282712771015:29pts/000:00:00grepredisroot2395310Mar03?13:43:16/data/database/meijiesit_6379_redis/bin/redis-server0.0.0.0:63792.cd到redis的bin目录./redis-cli启动客户端查找key发现需要

  • tomcat路径怎么找_tomcat项目路径

    tomcat路径怎么找_tomcat项目路径Maven配置覆盖内嵌tomcat虚拟映射路径

  • 圆柱的体积计算公式是什么怎么计算_圆柱计算体积的公式

    圆柱的体积计算公式是什么怎么计算_圆柱计算体积的公式长方形的周长=(长宽)×2正方形的周长=边长×4长方形的面积=长×宽正方形的面积=边长×边长三角形的面积=底×高÷2平行四边形的面积=底×高梯形的面积=(上底下底)×高÷2直径=半径×2半径=直径÷2圆的周长=圆周率×直径=圆周率×半径×2圆的面积=圆周率×半径×半径长方体的表面积=(长×宽长×高+宽×高)×2长方体的体积=长×宽×高正方体的表面积=棱长×棱长×6正方体的体积=棱长×棱长…

  • ASPCMS 错误号:-2147467259 解决办法

    ASPCMS 错误号:-2147467259 解决办法运行网站的时候,居然提示:提示:【】错误号:-2147467259错误描述:未指定的错误其实说白了,出现这种情况,就是权限问题,解决方法如下:A、打开系统目录下的windows/temp属性;(注意:这里是temp文件夹的属性)B、切换到安全标签,在安全标签里面的所有用户组,你都赋予完全控制权限就OK了;如果没有出现安全选项标签的话,请根据以下方法让安全标签出现:1、打开“我的电脑”→工具菜单→文件夹选项→取消“使用简单文件夹共享”前面的打钩√…

  • json转字符串 python_Python读取json

    json转字符串 python_Python读取json序列化与反序列化按照某种规则,把内存中的数据保存到文件中,文件是一个字节序列,所以必须要把内存数据转换成为字节序列,输出到文件,这就是序列化;反之,从文件的字节恢复到内存,就是反序列化;pytho

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号