删除
delete.java
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 4 <!DOCTYPE html> 5 <html> 6 <head> 7 <meta charset="UTF-8"> 8 <title>删除界面</title> 9 </head> 10 <body> 11 <% 12 Object message = request.getAttribute("message"); 13 Object user = request.getAttribute("user"); 14 if(message!=null && !"".equals(message)){ 15 16 %> 17 <script type="text/javascript"> 18 alert("<%=request.getAttribute("message")%>"); 19 </script> 20 <%} %> 21 22 <table align="center" width="900" border="1"> 23 <tr > 24 <td colspan="9" align="center"> 25 <a href="index.jsp">返回首页</a> 26 </td> 27 </tr> 28 29 <tr> 30 <td>姓名</td> 31 <td>户别</td> 32 <td>住房类型</td> 33 <td>本户现在住房面积</td> 34 <td>本户现住房间数</td> 35 <td>身份证号码</td> 36 <td>性别</td> 37 <td>民族</td> 38 <td>受教育程度</td> 39 </tr> 40 41 <tr> 42 <td>${user.name}</td> 43 <td>${user.hometype}</td> 44 <td>${user.roomtype}</td> 45 <td>${user.square}</td> 46 <td>${user.roomnumber}</td> 47 <td>${user.ID}</td> 48 <td>${user.sex}</td> 49 <td>${user.nation}</td> 50 <td>${user.xueli}</td> 51 <td><a href="servlet?method=delete&name=${user.name}">删除</a></td> 52 53 </tr> 54 55 56 </table> 57 58 </body> 59 </html>
查找功能页
findall.java
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 4 <html> 5 <head> 6 <meta charset="UTF-8"> 7 <title>首页</title> 8 <style> 9 .a{ 10 font-size: 26px; 11 margin-top: 20px; 12 } 13 </style> 14 </head> 15 <body style="background-color: #9999CC "> 16 <% 17 Object message = request.getAttribute("message"); 18 if(message!=null && !"".equals(message)){ 19 20 %> 21 <script type="text/javascript"> 22 alert("<%=request.getAttribute("message")%>"); 23 </script> 24 <%} %> 25 <a href="index.jsp">返回主页</a> 26 <div align="center"> 27 <h1 style="color: blue;">模糊查询</h1> 28 <div class="a"> 29 <a href="find.jsp">姓名模糊查询</a> 30 </div> 31 <div class="a"> 32 <a href="findsex.jsp">性别模糊查询</a> 33 </div> 34 <div class="a"> 35 <a href="findnation.jsp">民族模糊查询</a> 36 </div> 37 <div class="a"> 38 <a href="findxueli.jsp">受教育程度模糊查询</a> 39 </div> 40 41 </div> 42 </body> 43 </html>
按民族查询
findnation.java
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>查询</title> </head> <body > <% Object message = request.getAttribute("message"); Object grade_list = request.getAttribute("grade_list"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <a href="index.jsp">返回主页</a> <form action="findservlet?method=selectByName1" method="post"> <div align="center" class="a"> 民族:<input type="text" name="nation"> <div class="a"> <button type="submit" >确 定</button> </div> </div> </form> </body> </html>
按性别查询
findsex.java
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <!DOCTYPE html> 4 <html> 5 <head> 6 <meta charset="UTF-8"> 7 <title>查询</title> 8 9 </head> 10 <body > 11 <% 12 Object message = request.getAttribute("message"); 13 14 Object grade_list = request.getAttribute("grade_list"); 15 if(message!=null && !"".equals(message)){ 16 17 %> 18 <script type="text/javascript"> 19 alert("<%=request.getAttribute("message")%>"); 20 </script> 21 <%} %> 22 <a href="index.jsp">返回主页</a> 23 <form action="findservlet?method=selectByName1" method="post"> 24 <div align="center" class="a"> 25 性别:<input type="text" name="sex"> 26 <div class="a"> 27 <button type="submit" >确 定</button> 28 </div> 29 </div> 30 </form> 31 </body> 32 </html>
按学历查询
findxueli.java
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <!DOCTYPE html> 4 <html> 5 <head> 6 <meta charset="UTF-8"> 7 <title>查询</title> 8 9 </head> 10 <body > 11 <% 12 Object message = request.getAttribute("message"); 13 14 Object grade_list = request.getAttribute("grade_list"); 15 if(message!=null && !"".equals(message)){ 16 17 %> 18 <script type="text/javascript"> 19 alert("<%=request.getAttribute("message")%>"); 20 </script> 21 <%} %> 22 <a href="index.jsp">返回主页</a> 23 <form action="findservlet?method=selectByName1" method="post"> 24 <div align="center" class="a"> 25 受教育程度:<input type="text" name="学历"> 26 <div class="a"> 27 <button type="submit" >确 定</button> 28 </div> 29 </div> 30 </form> 31 </body> 32 </html>