基于Jsp+Servlet的物流 信息管理系统

注册+登录+增删改查+分页查询+jsp+servlet+JavaBean+MySQL+tomcat
此项目为最基本的Java web课程作业,是之前在学校的课程设计。只需要对数据、数据类型进行修改,就可以作为其他名称的项目。
主要技术:Jsp+Servlet+Mysql+Tomcat+Eclipse
适用场合:Java课程设计/Java大作业
项目类型:JAVA WEB项目
用户类型:单用户
开发工具:Eclipse
数据库表:2张
功能介绍:实现注册登录,分页查询,以及对物流信息的增删改查。

1.注册
2.登录
3.分页查询
4.添加物流信息
5.删除物流信息
6.修改物流信息
7.查找物流信息
8.监听器+过滤器

项目视频演示在最下方

项目非开源
需要项目源码+数据库咨询:“那条学长”(V)(公)
在这里插入图片描述

回复java查看源码大全

Jsp+Servlet的学生上课签到打卡系统【原创开发】
Jsp+Servlet图书管理系统【原创开发】
Jsp+Servlet的新闻管理系统【原创开发】
Jsp+Servlet的外卖配送系统/在线点餐系统【原创开发】

1.管理员端功能介绍

1.1欢迎界面

在这里插入图片描述

1.2用户注册

在这里插入图片描述

1.3用户登录

在这里插入图片描述

1.4物流信息增删改查

在这里插入图片描述

1.5添加和修改物流信息

在这里插入图片描述

1.6查询信息

在这里插入图片描述

2.截取部分代码介绍,可参考风格学习

2.1addInfo.jsp

jsp页面内数据通过form表单提交。

 <form  action="ExpressServlet?method=AddExpressAct" method="post">
        <input type="hidden" name="id"  />
          <div class="form-group">
          <label for="expressno">物流订单编号</label>
            <div class="form-label-group">
              <input type="text" id="eno" name="eno" class="form-control" placeholder="请输入用户名" required="required" autofocus="autofocus">
            </div>
          </div>
          <div class="form-group">
            <label for="ename">车辆车牌号</label>
            <div class="form-label-group">
              <input type="text" id="carno" name="carno"  class="form-control" placeholder="请输入车辆车牌号" required="required">
            </div>
          </div>
           <div class="form-group">
            <label for="ename">物流物品信息</label>
            <div class="form-label-group">
              <input type="text" id="goods" name="goods"  class="form-control" placeholder="请输入物流拉货物品" required="required">
            </div>
          </div>
            <div class="form-group">
            <label for="isStartLocation">始发地</label>
            <div class="form-label-group">
              <input type="text" id="isStartLocation" name="isStartLocation"  class="form-control" placeholder="请输入密码" required="required">
            </div>
          </div>
           <div class="form-group">
            <label for="isEndLocation">终点站</label>
            <div class="form-label-group">
              <input type="text" id="isEndLocation" name="isEndLocation"  class="form-control" placeholder="请输入密码" required="required">
            </div>
          </div><div class="form-group">
            <label for="price">物流运费</label>
            <div class="form-label-group">
              <input type="text" id="price" name="price"  class="form-control" placeholder="请输入密码" required="required">
            
            </div>
          </div>
          
           <div class="form-group">
            <label for="createTime">发货日期</label>
            <div class="form-label-group">
              <input type="date" id="createTime" name="createTime"  class="form-control" placeholder="请输入密码" required="required">
            
            </div>
          </div>
          
            <div class="form-group">
            <label for="expresser">快递员</label>
            <div class="form-label-group">
              <input type="text" id="expresser" name="expresser"  class="form-control" placeholder="请输入密码" required="required">
            
            </div>
          </div>
       
         <input type="submit" class="btn btn-primary btn-block" value="立即添加"></a>
        
        </form>

2.2ExpressBean.java

package bean;

import java.sql.Date;

public class Express {
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getEno() {
		return eno;
	}
	public void setEno(String eno) {
		this.eno = eno;
	}
	public String getCarno() {
		return carno;
	}
	public void setCarno(String carno) {
		this.carno = carno;
	}
	public String getGoods() {
		return goods;
	}
	public void setGoods(String goods) {
		this.goods = goods;
	}
	public String getIsStartLocation() {
		return isStartLocation;
	}
	public void setIsStartLocation(String isStartLocation) {
		this.isStartLocation = isStartLocation;
	}
	public String getIsEndLocation() {
		return isEndLocation;
	}
	public void setIsEndLocation(String isEndLocation) {
		this.isEndLocation = isEndLocation;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getExpresser() {
		return expresser;
	}
	public void setExpresser(String expresser) {
		this.expresser = expresser;
	}
	private Integer id;
	
	private String eno;
	private String carno;
	private String goods;
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	private double price;
	
	private String isStartLocation;
	private String isEndLocation;
	private Date createTime;
	private String expresser;

}

2.3ExpressServlet.java

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		Object attribute= request.getParameter("method");
		String method = "";
		if(attribute != null){
			method = attribute.toString();
		}
		
		//显示数据
		if("ExpressListAct".equals(method)){
			try {
				ExpressList(request,response);
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			return;
		}
		//删除user操作
		if("DelExpressAct".equals(method)){
			int id=Integer.parseInt(request.getParameter("id"));
			System.out.println(id);
			boolean b=dao.deleteExpress(id);
			System.out.println(id);
			if(b==true) {
				try {
					ExpressList(request,response);
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}else {
				response.sendRedirect("success.jsp");
			}
			return;
		}
		
	
		//根据id查询
		if("QueryByIdAct".equals(method)){
			int id=Integer.parseInt(request.getParameter("id"));
			System.out.println(id+"ad");
			Express express=dao.queryById(id);
			request.setAttribute("list", express);
			request.getRequestDispatcher("updateExpress.jsp").forward(request, response);
			return;
		}
		
		if("findByEnoAct".equals(method)){
			String eno=request.getParameter("eno");
			System.out.println(eno);
			List<Express> list=dao.findByEno(eno);
			request.setAttribute("list", list);
			request.getRequestDispatcher("listExpress.jsp").forward(request, response);
			return;
		}
		
		//根据id更改
		if("UpdateExpressAct".equals(method)){
			int id=Integer.parseInt(request.getParameter("id"));
			
		
			String eno=request.getParameter("eno");
			String carno=request.getParameter("carno");
			String goods=request.getParameter("goods");
			double price=Double.parseDouble(request.getParameter("price"));
			String isStartLocation=request.getParameter("isStartLocation");
			String isEndLocation=request.getParameter("isEndLocation");
			String expresser=request.getParameter("expresser");
			Date createTime=Date.valueOf(request.getParameter("createTime"));
			
			
			Express record=new Express();
			record.setEno(eno);
			record.setCarno(carno);
			record.setGoods(goods);
			record.setPrice(price);
			record.setIsStartLocation(isStartLocation);
			record.setIsEndLocation(isEndLocation);
			record.setCreateTime(createTime);
			
			record.setExpresser(expresser);
		
				
			
			boolean b=dao.update(record,id);
			if(b==true){
				request.setAttribute("message", "<script> alert('更改成功!')</script>");
				try {
					ExpressList(request, response);
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}else{
				response.sendRedirect("updateExpress.jsp");
			}
			return;
		}
		
		if("AddExpressAct".equals(method)){
			String eno=request.getParameter("eno");
			String carno=request.getParameter("carno");
			String goods=request.getParameter("goods");
			double price=Double.parseDouble(request.getParameter("price"));
			String isStartLocation=request.getParameter("isStartLocation");
			String isEndLocation=request.getParameter("isEndLocation");
			String expresser=request.getParameter("expresser");
			Date createTime=Date.valueOf(request.getParameter("createTime"));
			Express record=new Express();
			record.setEno(eno);
			record.setCarno(carno);
			record.setGoods(goods);
			record.setPrice(price);
			record.setIsStartLocation(isStartLocation);
			record.setIsEndLocation(isEndLocation);
			record.setCreateTime(createTime);
			record.setExpresser(expresser);
			boolean b=dao.insert(record);
			if(b==true){
				request.setAttribute("message", "<script> alert('插入成功!')</script>");
				try {
					ExpressList(request, response);
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}else{
				response.sendRedirect("updateExpress.jsp");
			}
			return;
		}
	}

4.数据库设计

在这里插入图片描述
在这里插入图片描述

- ----------------------------
-- Table structure for express
-- ----------------------------
DROP TABLE IF EXISTS `express`;
CREATE TABLE `express`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `eno` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `carno` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `goods` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `isStartLocation` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `isEndLocation` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `createTime` datetime(0) NULL DEFAULT NULL,
  `expresser` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `price` double(10, 2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of express
-- ----------------------------
INSERT INTO `express` VALUES (2, '112211212', '苏A123455', '蔬菜', '江苏南京', '河南南阳', '2020-05-31 00:00:00', '李庆照', 1000.00);
INSERT INTO `express` VALUES (3, '112211212', '苏A123455', '蔬菜', '江苏南京', '河南南阳', '2020-05-31 00:00:00', '李庆照', 1000.00);

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `password` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 'admin', '123456');
INSERT INTO `user` VALUES (8, 'test1', '123456');
INSERT INTO `user` VALUES (9, 'test3', '1234567');
INSERT INTO `user` VALUES (11, 'test6', '1234567');
INSERT INTO `user` VALUES (12, 'test4', '123456');
INSERT INTO `user` VALUES (13, 'test4', '123456');

SET FOREIGN_KEY_CHECKS = 1;

[Java课程作业]基于Jsp+Servlet的物流信息管理系统

  • 3
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
本书共包含投票系统、通讯簿管理系统、新闻发布系统、软件下载中心、电子书店系统和论坛系统等六个系统。这六个系统均使用JSP语言和HTML标记语言编写完成的。要想运行该程序,还要进行如下操作: (1) 安装JDK1.4.0或以上版本。 (2) 安装Apache Tomcat 4.0或以上版本。 (3) 配置ODBC数据源。数据源名按各系统所使用的名称配置,具体名称如下 ① 投票系统的数据源名:vote ② 通讯簿管理系统的数据源名:user ③ 新闻发布系统的数据源名:news ④ 软件下载中心的数据源名:download ⑤ 电子书店系统的数据源名:bookstore ⑥ 论坛系统的数据源名:forum vote文件夹包含的是投票系统的源代码。投票系统分为普通用户访问界面和管理员访问界面两部分。普通用户访问界面由index.jsp页面进入,不需要用户名和密码;管理员访问界面由login.jsp页面进入,管理员用户名是:admin,密码是:admin。 userinfo文件夹包含的是通讯簿管理系统的源代码。通讯簿管理系统分为普通用户访问界面和管理员访问界面两部分。两种用户均通过login.htm页面进入系统,所使用的用户名的身份不同即进入不同的访问界面。用户名和密码可以在数据库mydb中的user数据表中查询。 news文件夹包含的是新闻发布系统的源代码。新闻发布系统分为普通用户访问界面和管理员访问界面两部分。普通用户访问界面使用index.jsp页面进入,不需要用户名和密码;管理员访问用户界面使用login.jsp页面进入,管理员的用户名是:admin,密码是:admin。 download文件夹包含的是软件下载中心的源代码。软件下载中心分为普通用户访问界面和管理员访问界面两部分。普通用户访问界面使用index.jsp页面进入,不需要用户名和密码;管理员访问用户界面使用login.jsp页面进入,管理员的用户名是:admin,密码是:admin。 bookstore文件夹包含的是电子书店的源代码。电子书店分为普通用户访问界面和管理员访问界面两部分。两种用户均通过login.jsp页面进入系统,所使用的用户名的身份不同即进入不同的访问界面。用户名和密码可以在数据库book中的user数据表中查询。 forum文件夹包含的是论坛系统的源代码。论坛系统分为普通用户访问界面、版主访问界面和管理员访问界面三部分。三种用户均通过login.jsp页面进入系统,所使用的用户名的身份不同即进入不同的访问界面。用户名和密码可以在数据库forum中的user数据表中查询。 由于编者水平有限,编写时间仓促,书中错误和不妥之处在所难免,请读者和专家批评指正。 ,

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

那条学长V

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值