库存物资管理系统:

1.首先建两个数据表,一个pass用于商品的增删改查,一个passd记录商品的出库与入库信息;

2.建两个实体类,用来传递商品与单据的信息

3.在添加与删除时,填写入库或者出库单据,入库时增加商品,出库时删除商品。course类写商品的增删改查,另一个dao类只写单据的添加,自后将两张表连接起来

package common;

public class Pass {
private int id;
private String name; /*名称*/
private String vender;/*生产厂家*/
private String xnumber;/*型号*/
private String standard;/*规格*/
public int getId() {
return id;
}
public void setId() {
this.id=id;
}
public String getName() {
return name;
}
public void setName() {
this.name=name;
}
public String getVender() {
return vender;
}
public void setVender() {
this.vender=vender;
}
public String getXnumber() {
return xnumber;
}
public void setXnumber() {
this.xnumber=xnumber;
}
public String getStandard() {
return standard;
}
public void setStandard() {
this.standard=standard;
}
public Pass() {} public Pass(int id, String name, String vender, String xnumber,String standard) {
this.id = id;
this.name = name;
this.vender=vender;
this.xnumber = xnumber;
this.standard = standard;
} public Pass( String name, String vender, String xnumber,String standard) {
this.name = name;
this.vender=vender;
this.xnumber = xnumber;
this.standard = standard;
}
}
package dao;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import common.Pass;
import helper.DeHelper;
public class PassDao {
/**
* 添加
* @param course
* @return
*/
public boolean add(Pass pass) {
String sql = "insert into pass(name, vender, xnumber,standard) values('" + pass.getName() + "','" + pass.getVender() + "','" + pass.getXnumber() + "','"+pass.getStandard()+"')";
Connection conn = DeHelper.getConn();
Statement state = null;
boolean f = false;
int a = 0; try {
state = conn.createStatement();
state.executeUpdate(sql);
} catch (Exception e) {
e.printStackTrace();
} finally {
DeHelper.close(state, conn);
} if (a > 0) {
f = true;
}
return f;
}
/**
* 删除
*
* @param id
* @return
*/
public boolean delete (int id) {
boolean f = false;
String sql = "delete from pass where id='" + id + "'";
Connection conn = DeHelper.getConn();
Statement state = null;
int a = 0; try {
state = conn.createStatement();
a = state.executeUpdate(sql);
} catch (SQLException e) {
e.printStackTrace();
} finally {
DeHelper.close(state, conn);
} if (a > 0) {
f = true;
}
return f;
}
/**
* 修改
* @param name
* @param pass
*/
public boolean update(Pass pass) {
String sql = "update pass set name='" + pass.getName() + "', vender='" + pass.getVender() + "', xnumber='" + pass.getXnumber()+"',standard='"+pass.getStandard()
+ "' where id='" + pass.getId() + "'";
Connection conn = DeHelper.getConn();
Statement state = null;
boolean f = false;
int a = 0; try {
state = conn.createStatement();
a = state.executeUpdate(sql);
} catch (SQLException e) {
e.printStackTrace();
} finally {
DeHelper.close(state, conn);
} if (a > 0) {
f = true;
}
return f;
}
/**
* 验证名称是否唯一
* true --- 不唯一
* @param name
* @return
*/
public boolean name(String name) {
boolean flag = false;
String sql = "select name from course where name = '" + name + "'";
Connection conn = DeHelper.getConn();
Statement state = null;
ResultSet rs = null; try {
state = conn.createStatement();
rs = state.executeQuery(sql);
while (rs.next()) {
flag = true;
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
DeHelper.close(rs, state, conn);
}
return flag;
} /**
* 通过ID得到类
* @param id
* @return
*/
public Pass getPassById(int id) {
String sql = "select * from pass where id ='" + id + "'";
Connection conn = DeHelper.getConn();
Statement state = null;
ResultSet rs = null;
Pass pass = null; try {
state = conn.createStatement();
rs = state.executeQuery(sql);
while (rs.next()) {
String name = rs.getString("name");
String vender = rs.getString("vender");
String xnumber = rs.getString("xnumber");
String standard=rs.getString("standard");
pass = new Pass(id, name, vender, xnumber,standard);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
DeHelper.close(rs, state, conn);
} return pass;
} /**
* 通过name得到Pass
* @param name
* @return
*/
public Pass getPassByName(String name) {
String sql = "select * from pass where name ='" + name + "'";
Connection conn = DeHelper.getConn();
Statement state = null;
ResultSet rs = null;
Pass pass = null; try {
state = conn.createStatement();
rs = state.executeQuery(sql);
while (rs.next()) {
int id = rs.getInt("id");
String vender = rs.getString("vender");
String xnumber = rs.getString("xnumber");
String standard=rs.getString("standard");
pass = new Pass(id, name,vender, xnumber, standard);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
DeHelper.close(rs, state, conn);
} return pass;
} /**
* 查找
* @param name
* @param teacher
* @param classroom
* @return
*/
public List<Pass> search(String name, String vender, String xnumber,String standard) {
String sql = "select * from pass where ";
if (name != "") {
sql += "name like '%" + name + "%'";
}
if (vender != "") {
sql += "vender like '%" + vender + "%'";
}
if (xnumber != "") {
sql += "xnumber like '%" + xnumber + "%'";
}
if (standard != "") {
sql += "standard like '%" + standard + "%'";
}
List<Pass> list = new ArrayList<>();
Connection conn = DeHelper.getConn();
Statement state = null;
ResultSet rs = null; try {
state = conn.createStatement();
rs = state.executeQuery(sql);
Pass bean = null;
while (rs.next()) {
int id = rs.getInt("id");
String name2 = rs.getString("name");
String vender2 = rs.getString("vender");
String xnumber2 = rs.getString("xnumber");
String standard2=rs.getString("standard");
bean = new Pass(id, name2, vender2, xnumber2 ,standard2);
list.add(bean);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
DeHelper.close(rs, state, conn);
} return list;
} /**
* 全部数据
* @param name
* @param teacher
* @param classroom
* @return
*/
public List<Pass> list() {
String sql = "select * from pass";
List<Pass> list = new ArrayList<>();
Connection conn = DeHelper.getConn();
Statement state = null;
ResultSet rs = null; try {
state = conn.createStatement();
rs = state.executeQuery(sql);
Pass bean = null;
while (rs.next()) {
int id = rs.getInt("id");
String name2 = rs.getString("name");
String vender2 = rs.getString("vender");
String xnumber2 = rs.getString("xnumber");
String standard2=rs.getString("standard");
bean = new Pass(id, name2, vender2, xnumber2 ,standard2);
list.add(bean);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
DeHelper.close(rs, state, conn);
} return list;
}
}
package helper;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement; /**
* 数据库连接工具
* @author Hu
*
*/
public class DeHelper { public static String db_url = "jdbc:mysql://localhost:3306/MySQL?useSSL=false";
public static String db_user = "root";
public static String db_pass = "995893"; public static Connection getConn () {
Connection conn = null; try {
Class.forName("com.mysql.jdbc.Driver");//加载驱动
conn = DriverManager.getConnection(db_url, db_user, db_pass);
} catch (Exception e) {
e.printStackTrace();
} return conn;
} /**
* 关闭连接
* @param state
* @param conn
*/
public static void close (Statement state, Connection conn) {
if (state != null) {
try {
state.close();
} catch (SQLException e) {
e.printStackTrace();
}
} if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
} public static void close (ResultSet rs, Statement state, Connection conn) {
if (rs != null) {
try {
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
} if (state != null) {
try {
state.close();
} catch (SQLException e) {
e.printStackTrace();
}
} if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
} }
package service;

import dao.PassDao;

import java.util.List;

import common.Pass;

/**
* PassService
* 服务层
* @author Hu
*
*/
public class PassService { PassDao cDao = new PassDao(); /**
* 添加
* @param course
* @return
*/
public boolean add(Pass pass) {
boolean f = false;
if(!cDao.name(pass.getName())) {
cDao.add(pass);
f = true;
}
return f;
} /**
* 删除
*/
public void del(int id) {
cDao.delete(id);
} /**
* 修改
* @return
*/
public void update(Pass pass) {
cDao.update(pass);
} /**
* 通过ID得到一个Course
* @return
*/
public Pass getPassById(int id) {
return cDao.getPassById(id);
} /**
* 通过Name得到一个Course
* @return
*/
public Pass getPassByName(String name) {
return cDao.getPassByName(name);
} /**
* 查找
* @return
*/
public List<Pass> search(String name, String vender, String xnumber,String standard) {
return cDao.search(name, vender, xnumber,standard);
} /**
* 全部数据
* @return
*/
public List<Pass> list() {
return cDao.list();
}
}
package servlet;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import common.Pass;
import service.PassService;
@WebServlet("/PassServlet")
public class PassServlet extends HttpServlet { private static final long serialVersionUID = 1L; PassService service = new PassService(); /**
* 方法选择
*/
protected void service(HttpServletRequest req, HttpServletResponse resp)throws ServletException,IOException{
req.setCharacterEncoding("utf-8");
String method = req.getParameter("method");
if ("add".equals(method)) {
add(req, resp);
} else if ("del".equals(method)) {
del(req, resp);
} else if ("update".equals(method)) {
update(req, resp);
} else if ("search".equals(method)) {
search(req, resp);
} else if ("getpassbyid".equals(method)) {
getPassById(req, resp);
} else if ("getpassbyname".equals(method)) {
getPassByName(req, resp);
} else if ("list".equals(method)) {
list(req, resp);
}
} /**
* 添加
* @param req
* @param resp
* @throws IOException
* @throws ServletException
*/
private void add(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
req.setCharacterEncoding("utf-8");
String name = req.getParameter("name");
String vender = req.getParameter("vender");
String xnumber = req.getParameter("xnumber");
String standard = req.getParameter("standard ");
Pass pass = new Pass(name, vender,xnumber,standard); //添加后消息显示
if(service.add(pass)) {
req.setAttribute("message", "添加成功");
req.getRequestDispatcher("add.jsp").forward(req,resp);
} else {
req.setAttribute("message", "产品重复,请重新录入");
req.getRequestDispatcher("add.jsp").forward(req,resp);
}
} /**
* 全部
* @param req
* @param resp
* @throws ServletException
*/
private void list(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{
req.setCharacterEncoding("utf-8");
List<Pass> pass = service.list();
req.setAttribute("pass", pass);
req.getRequestDispatcher("list.jsp").forward(req,resp);
} /**
* 通过ID得到Pass
* @param req
* @param resp
* @throws ServletException
*/
private void getPassById(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{
req.setCharacterEncoding("utf-8");
int id = Integer.parseInt(req.getParameter("id"));
Pass pass = service.getPassById(id);
req.setAttribute("pass", pass);
req.getRequestDispatcher("detail2.jsp").forward(req,resp);
} /**
* 通过名字查找
* 跳转至删除
* @param req
* @param resp
* @throws IOException
* @throws ServletException
*/
private void getPassByName(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{
req.setCharacterEncoding("utf-8");
String name = req.getParameter("name");
Pass pass = service.getPassByName(name);
if(pass == null) {
req.setAttribute("message", "查无此产品!");
req.getRequestDispatcher("del.jsp").forward(req,resp);
} else {
req.setAttribute("pass", pass);
req.getRequestDispatcher("detail.jsp").forward(req,resp);
}
} /**
* 删除
* @param req
* @param resp
* @throws IOException
* @throws ServletException
*/
private void del(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{
req.setCharacterEncoding("utf-8");
int id = Integer.parseInt(req.getParameter("id"));
service.del(id);
req.setAttribute("message", "删除成功!");
req.getRequestDispatcher("del.jsp").forward(req,resp);
} /**
* 修改
* @param req
* @param resp
* @throws IOException
* @throws ServletException
*/
private void update(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{
req.setCharacterEncoding("utf-8");
int id = Integer.parseInt(req.getParameter("id"));
String name = req.getParameter("name");
String vender = req.getParameter("vender");
String xnumber = req.getParameter("xnumber");
String standard=req.getParameter("standard");
Pass pass = new Pass(id, name,vender, xnumber, standard); service.update(pass);
req.setAttribute("message", "修改成功");
req.getRequestDispatcher("PassServlet?method=list").forward(req,resp);
} /**
* 查找
* @param req
* @param resp
* @throws ServletException
*/
private void search(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{
req.setCharacterEncoding("utf-8");
String name = req.getParameter("name");
String vender = req.getParameter("vender");
String xnumber = req.getParameter("xnumber");
String standard=req.getParameter("standard");
List<Pass> pass = service.search(name, vender, xnumber, standard);
req.setAttribute("courses", pass);
req.getRequestDispatcher("searchlist.jsp").forward(req,resp);
}
}
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.a{
margin-top: 20px;
}
.b{
font-size: 20px;
width: 160px;
color: white;
background-color: greenyellow;
}
</style>
</head>
<body>
<%
Object message = request.getAttribute("message");
if(message!=null && !"".equals(message)){ %>
<script type="text/javascript">
alert("<%=request.getAttribute("message")%>");
</script>
<%} %>
<div align="center">
<h1 style="color: red;">产品信息录入</h1>
<a href="index.jsp">返回主页</a>
<form action="PassServlet?method=add" method="post" onsubmit="return check()">
<div class="a">
产品名称<input type="text" id="name" name="name"/>
</div>
<div class="a">
生产厂家<input type="text" id="vender" name="vender" />
</div>
<div class="a">
型号<input type="text" id="xnumber" name="xnumber" />
</div>
<div class="a">
规格<input type="text" id="standard" name="standard" />
<div class="a">
<button type="submit" class="b">保&nbsp;&nbsp;&nbsp;存</button>
</div>
</form>
</div>
<script type="text/javascript">
function check() {
var name = document.getElementById("name");;
var vender = document.getElementById("vender");
var xnumber = document.getElementById("xnumber");
var standard = document.getElementById("standard");
//非空
if(name.value == '') {
alert('无此产品');
name.focus();
return false;
}
if(vender.value == '') {
alert('不知厂家');
vender.focus();
return false;
}
if(xnumber.value == '') {
alert('型号不明');
xnumber.focus();
return false;
}
if(standard.value == '') {
alert('规格不明');
standard.focus();
return false;
}
}
</script>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.a{
margin-top: 20px;
}
.b{
font-size: 20px;
width: 160px;
color: white;
background-color: greenyellow;
}
</style>
</head>
<body>
<%
Object message = request.getAttribute("message");
if(message!=null && !"".equals(message)){ %>
<script type="text/javascript">
alert("<%=request.getAttribute("message")%>");
</script>
<%} %>
<div align="center">
<h1 style="color: red;">产品信息删除</h1>
<a href="index.jsp">返回主页</a>
<form action="CourseServlet?method=getcoursebyname" method="post" onsubmit="return check()">
<div class="a">
产品名称<input type="text" id="name" name="name"/>
</div>
<div class="a">
<button type="submit" class="b">查&nbsp;&nbsp;&nbsp;找</button>
</div>
</form>
</div>
<script type="text/javascript">
function check() {
var name = document.getElementById("name");; //非空
if(name.value == '') {
alert('无此产品');
name.focus();
return false;
}
}
</script>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.a{
margin-top: 20px;
}
.b{
font-size: 20px;
width: 160px;
color: white;
background-color: greenyellow;
}
.tb, td {
border: 1px solid black;
font-size: 22px;
}
</style>
</head>
<body>
<div align="center">
<h1 style="color: red;">产品信息删除</h1>
<a href="index.jsp">返回主页</a>
<table class="tb">
<tr>
<td>产品名称</td>
<td>${pass.name}</td>
</tr>
<tr>
<td>生产厂家</td>
<td>${pass.vender}</td>
</tr>
<tr>
<td>型号</td>
<td>${pass.xnumber}</td>
</tr>
<tr>
<td>规格</td>
<td>${pass.standard}</td>
</tr>
</table>
<div class="a">
<a onclick="return check()" href="PassServlet?method=del&id=${pass.id}">删&nbsp;&nbsp;&nbsp;除</a>
</div>
</div>
<script type="text/javascript">
function check() {
if (confirm("是否删除?")){
return true;
}else{
return false;
}
}
</script>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.a{
margin-top: 20px;
}
.b{
font-size: 20px;
width: 160px;
color: white;
background-color: greenyellow;
}
</style>
</head>
<body>
<%
Object message = request.getAttribute("message");
if(message!=null && !"".equals(message)){ %>
<script type="text/javascript">
alert("<%=request.getAttribute("message")%>");
</script>
<%} %>
<div align="center">
<h1 style="color: red;">产品信息修改</h1>
<a href="index.jsp">返回主页</a>
<form action="CourseServlet?method=update" method="post" onsubmit="return check()">
<div class="a">
产品名称<input type="text" id="name" name="name" value="${pass.name}"/>
</div>
<div class="a">
生产厂家<input type="text" id="vender" name="vender" value="${pass.vender}"/>
</div>
<div class="a">
型号<input type="text" id="xnumber" name="xnumber" value="${pass.xnumber}"/>
</div>
<div class="a">
规格<input type="text" id="standard" name="standard" value="${pass.standard}"/>
</div>
<input type="hidden" id="id" name="id" value="${pass.id}"/>
<div class="a">
<button type="submit" class="b">修&nbsp;&nbsp;&nbsp;改</button>
</div>
</form>
</div>
<script type="text/javascript">
function check() {
var name = document.getElementById("name");;
var vender = document.getElementById("vender");
var xnumber = document.getElementById("xnumber");
var standard = document.getElementById("standard"); //非空
if(name.value == '') {
alert('无此产品');
name.focus();
return false;
}
if(vender.value == '') {
alert('厂家不明');
vender.focus();
return false;
}
if(xnumber.value == '') {
alert('型号不明');
xnumber.focus();
return false;
}
if(standard.value == '') {
alert('规格不明');
standard.focus();
return false;
} </script>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
<style>
.a{
font-size: 26px;
margin-top: 20px;
}
</style>
</head>
<body>
<div align="center">
<h1 style="color: red;">库存物资管理系统</h1>
<div class="a">
<a href="add.jsp">产品信息录入</a>
</div>
<div class="a">
<a href="PassServlet?method=list">产品信息修改</a>
</div>
<div class="a">
<a href="del.jsp">产品信息删除</a>
</div>
<div class="a">
<a href="search.jsp">产品信息查询</a>
</div>
</div>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.a{
margin-top: 20px;
}
.b{
font-size: 20px;
width: 160px;
color: white;
background-color: greenyellow;
}
.tb, td {
border: 1px solid black;
font-size: 22px;
}
</style>
</head>
<body>
<%
Object message = request.getAttribute("message");
if(message!=null && !"".equals(message)){ %>
<script type="text/javascript">
alert("<%=request.getAttribute("message")%>");
</script>
<%} %>
<div align="center">
<h1 style="color: red;">产品信息列表</h1>
<a href="index.jsp">返回主页</a>
<table class="tb">
<tr>
<td>id</td>
<td>产品名称</td>
<td>生产厂家</td>
<td>型号</td>
<td>规格<td>
<td align="center" colspan="2">操作</td>
</tr>
<c:forEach items="${courses}" var="item">
<tr>
<td>${item.id}</td>
<td>${item.name}</td>
<td>${item.vender}</td>
<td>${item.xnumber}</td>
<td>${item.standard}</td>
<td><a href="PassServlet?method=getpassbyid&id=${item.id}">修改</a></td>
</tr>
</c:forEach>
</table>
</div>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.a{
margin-top: 20px;
}
.b{
font-size: 20px;
width: 160px;
color: white;
background-color: greenyellow;
}
</style>
</head>
<body>
<div align="center">
<h1 style="color: red;">产品信息查询</h1>
<a href="index.jsp">返回主页</a>
<form action="PassServlet?method=add" method="post" onsubmit="return check()">
<div class="a">
产品名称<input type="text" id="name" name="name"/>
</div>
<div class="a">
生产厂家<input type="text" id="vender" name="vender" />
</div>
<div class="a">
型号<input type="text" id="xnumber" name="xnumber" />
</div>
<div class="a">
规格<input type="text" id="standard" name="standard" />
<div class="a">
<button type="submit" class="b">保&nbsp;&nbsp;&nbsp;存</button>
</div>
</form>
</div>
<script type="text/javascript">
function check() {
var name = document.getElementById("name");;
var vender = document.getElementById("vender");
var xnumber = document.getElementById("xnumber");
var standard = document.getElementById("standard"); //非空
if(name.value == '' && vender.value == '' && xnumber.value == ''&&standard.value=='') {
alert('请填写一个条件');
return false;
}
}
</script>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.a{
margin-top: 20px;
}
.b{
font-size: 20px;
width: 160px;
color: white;
background-color: greenyellow;
}
.tb, td {
border: 1px solid black;
font-size: 22px;
}
</style>
</head>
<body>
<div align="center">
<h1 style="color: red;">产品信息列表</h1>
<a href="index.jsp">返回主页</a>
<table class="tb">
<tr>
<td>id</td>
<td>产品名称</td>
<td>生产厂家</td>
<td>型号</td>
<td>规格<td>
</tr>
<!-- forEach遍历出adminBeans -->
<c:forEach items="${pass}" var="item" varStatus="status">
<tr>
<td>${item.id}</td>
<td><a>${item.name}</a></td>
<td>${item.vender}</td>
<td>${item.xnumber}</td>
<td>${item.standard}</td>
</tr>
</c:forEach>
</table>
</div>
</body>
</html>

12.13java过关测试的更多相关文章

  1. 测试工程师的12最 作为测试猿的你是否都遇到过o_o ....

    在51testing偶然看到一篇文章,觉得很不错,就转过来了.看完笑笑之后,如果能带来点思考就更好了. 1.测试工程师最开心的事:发现了一个很严重的bug,特别是那种隐藏很深,逻辑性的错误.偶第一次发 ...

  2. 《Cracking the Coding Interview》——第12章:测试——题目6

    2014-04-25 00:53 题目:你要如何测试一个分布式银行系统的ATM机? 解法:ATM是Automatic Teller Machine,取钱的.我想了半天,没找到什么很清晰的思路,也许是因 ...

  3. 《Cracking the Coding Interview》——第12章:测试——题目5·

    2014-04-25 00:41 题目:怎么测试一支笔?(Pen?您老说的是钢笔?) 解法:这种简约而不简单的题目,实在是面试官最喜欢,面试者最头疼的类型了.面试官可以只花三秒,以一种灰常高贵冷艳的语 ...

  4. 《Cracking the Coding Interview》——第12章:测试——题目4

    2014-04-25 00:35 题目:没有专门的测试工具,你要如何对一个网页进行压力测试? 解法:拼手速,拼电脑数量呗.快捷键+复制粘贴网址,狂搞一番.话说回来,有脚本语言的情况下,直接写个脚本来模 ...

  5. 《Cracking the Coding Interview》——第12章:测试——题目3

    2014-04-24 23:28 题目:玩象棋游戏,你要设计一个bool型的方法来检测一个棋子能否移动到指定位置. 解法:不同的棋子有不同的移动规则,那么应该采取棋子基类实现接口,各个棋子子类来实现的 ...

  6. 第12组 Beta测试(5/5)

    Header 队名:To Be Done 组长博客 作业博客 团队项目进行情况 燃尽图(组内共享) 展示Git当日代码/文档签入记录(组内共享) 注: 由于GitHub的免费范围内对多人开发存在较多限 ...

  7. 《Python学习手册 第五版》 -第12章 if测试和语法规则

    本章节的内容,主要讲解if语句,if语句是三大复合语句之一(其他两个是while和for),能处理编程中大多数逻辑运算 本章的重点内容如下: 1.if语句的基本形式(多路分支) 2.布尔表达式 3.i ...

  8. 《Cracking the Coding Interview》——第12章:测试——题目2

    2014-04-24 23:15 题目:你有一段程序,运行了十次每次都在不同的地方崩掉了.已知这段程序只用了标准C或C++库函数,请问有什么思路来找出问题所在. 解法:1. 时间戳每次都不同.2. 随 ...

  9. 《Cracking the Coding Interview》——第12章:测试——题目1

    2014-04-24 23:10 题目:找出下面代码里的错误. 解法:请看下面. 代码: // 12.1 What's wrong with the following code segment? # ...

随机推荐

  1. MVC字符串转json,ajax接受json返回值

    #region 功能 /// <summary> /// 查询 微信用户一定年月的账单 /// </summary> /// <param name="year ...

  2. Java课程作业之动手动脑(六)

    1.使用Files. walkFileTree()找出指定文件夹下所有大于指定大小(比如1M)的文件. import java.io.IOException; import java.nio.file ...

  3. 26.纯 CSS创作按钮被从纸上掀起的立体效果

    原文地址:https://segmentfault.com/a/1190000014930183 感想:主要2D和3D转换.阴影效果. HTML代码: <nav> <ul> & ...

  4. dom编程艺术章12

    function addLoadEvent(func){//添加事件函数 var oldonload = window.onload; if(typeof window.onload != 'func ...

  5. 看到的一个关于C++能力分级的描述

    精通没有标准,但学习有路径. 我来说说 学习掌握C++的路径吧,从低到高,分0-10级: 0级:掌握常见C++语法和语言构造,能够顺溜地写清楚各种语言构造(很多小白鼠死在这里)1级:掌握基本的编程范式 ...

  6. RestTemplate的异步使用

    参考:https://blog.csdn.net/yezhuanxu/article/details/53643248 支持异步调用AsyncRestTemplate @RequestMapping( ...

  7. docker资料转载

    Docker之理解image,container和storage-driver centos7创建docker tomcat镜像 Linux Namespace和Cgroup

  8. <基础> PHP 字符串操作

    explode — 使用一个字符串分割另一个字符串 array explode ( string $delimiter , string $string [, int $limit ] ) implo ...

  9. sql server 查看所有表记录数

    SELECT object_name (i.id) TableName, rows as rows FROM sysindexes i INNER JOIN sysObjects o ON (o.id ...

  10. jsfl 常用自定义方法

    //创建文件夹 function creatFile(fileURl) { if (FLfile.createFolder(fileURl)) { //alert("创建成功 "+ ...