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)


相关推荐

  • java.lang.NullPointerException出现的几种原因以及解决

    java.lang.NullPointerException出现的几种原因以及解决java.lang.NullPointerException出现的几种原因:1、字符串变量未初始化2、接口类型的对象没有用具体的类初始化,比如:Mapmap//会报错Mapmap=newMap();//则不会报错了3、当一个对象的值为空时,你没有判断为空的情况。4、字符串与文字的比较,文字可以是一个字符串或Enum的元素,如下会出现异常Stringstr…

  • httprunner(3)用脚手架快速搭建项目[通俗易懂]

    httprunner(3)用脚手架快速搭建项目[通俗易懂]前言如何快速搭建一个httprunner项目呢?我们可以使用脚手架,脚手架就是自动地创建一些目录,形成一个项目的架构,不需要我们再手动的去创建查看创建新项目的命令先来查看一下帮助命令httpr

  • 国外php网站_网盘资源搜索神器

    国外php网站_网盘资源搜索神器依赖管理依赖和包管理库Composer/Packagist:一个包和依赖管理器ComposerInstallers:一个多框架Composer库安装器Pickle:一个PHP扩展安装器 其他的依赖管理其他的相关依赖管理Satis:一个静态Composer存储库生成器Composition:一个在运行时检查Composer环境的库Version:语义版本的解析和比较

  • 【剑指offer】第一个仅仅出现一次的字符

    【剑指offer】第一个仅仅出现一次的字符

  • Java中一维数组和二维数组初始化 对象数组初始化「建议收藏」

    Java中一维数组和二维数组初始化 对象数组初始化「建议收藏」数组属于引用数据类型,在使用前必须初始化,否则会报NullPointerException(空指针异常:运行时异常)一维数组初始化:动态初始化:(声明并开辟数组)数据类型[]数组名称=new数据类型[长度]int[]data=newint[5]:声明并开辟一个长度为5的数组数组通过下标索引来获取元素,下标默认从0开始。数组下标超出数组长度,数组越界异常(运行时…

  • fastjson注解有哪些(json的注释)

    阿里的fastJoson是一个非常好用的类,json转化的时候用到的jsonField特此记录一下fastjson之@JSONField注解的几个的使用详细示范好文2https://blog.csdn.net/u011425751/article/details/51219242…

发表回复

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

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