以下包含的是增添对象对应其pojo的属性:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>新增</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- 引入 Bootstrap -->
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row clearfix">
<div class="col-md-12 column">
<div class="page-header">
<h1>
<small>新增pojo</small>
</h1>
</div>
</div>
</div>
<form action="${pageContext.request.contextPath}/book/addBook" method="post">
属性值1:<input type="text" name="bookName"><br><br><br>
属性值2:<input type="text" name="bookCounts"><br><br><br>
属性值3:<input type="text" name="authorname"><br><br><br>
<input type="submit" value="添加">
</form>
</div>
</body>
</html>
更改
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>修改</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- 引入 Bootstrap -->
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row clearfix">
<div class="col-md-12 column">
<div class="page-header">
<h1>
<small>修改</small>
</h1>
</div>
</div>
</div>
<form action="/book/updateBook" method="post">
<input type="hidden" name="bookID" value="${book.getBookID()}"/>
属性值1:<input type="text" name="bookName" value="${book.getBookName()}"/>
属性值2:<input type="text" name="bookCounts" value="${book.getBookCounts()}"/>
属性值3:<input type="text" name="authorname" value="${book.getAuthorname()}"/>
<input type="submit" value="提交"/>
</form>
</div>
</body>
</html>