<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="S.s"%> <%@ page import="Dao.dao"%> <%@ page import="java.util.ArrayList"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>A</title> </head> <body> <% //以下语句用于接收客户端传来的参数 dao d=new dao(); String zhuti3=request.getParameter("zhuti"); System.out.println("接收成功"); session.setAttribute("zhuti",zhuti3); String shijian4=request.getParameter("shijian"); System.out.println("接收成功"); session.setAttribute("shijian",shijian4); String leixing3=request.getParameter("leixing"); System.out.println("接收成功"); session.setAttribute("leixing",leixing3); String didian3=request.getParameter("didian"); System.out.println("接收成功"); session.setAttribute("didian",didian3); ArrayList<s> adc=new ArrayList<s>(); adc=d.search(zhuti3,shijian4,leixing3,didian3); %> <table border="1" width="100%"> <tr> <th>活动主题</th> <th>活动时间</th> <th>活动类型</th> <th>活动地点</th> </tr> <% for(int i=0;i<adc.size();i++) { s in=adc.get(i); String zhuti=in.Getzhuti(); String shijian=in.Getshijian(); String leixing=in.Getleixing(); String duixiang=in.Getdidian(); %> <tr> <td><a href="searchxiangxi.jsp">活动主题</a></td> <td><%=(shijian) %></td> <td><%=(leixing) %></td> <td><%=(duixiang) %></td> </tr> <% } %> </table> <input style="margin-left:230px;margin-top:90px;width:100px;height:60px" type = "button" value = "返回主菜单" onclick = "window.location.href = 'index.jsp'"> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>查找前端</title> </head> <body> <form action="search.jsp" method="get"> <form action="searchxiangxi.jsp" method="get"> <tr> <td>活动主题:</td> <input type="text" name="zhuti"/> </br> </tr> <tr> <td>活动时间:</td> <input type="text" name="shijian"/> </br> </tr> <tr> <td>活动类型:</td> <input type="text" name="leixing"/> </br> </tr> <tr> <td>活动地点:</td> <input type="text" name="didian"/> </br> </tr> <tr align="center"> <td colspan="2"><input type="submit" value="查询" /></td> </br> </tr> </table> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="S.s"%> <%@ page import="java.util.ArrayList" %> <%@ page import="Dao.dao"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>A</title> </head> <body> <% //以下语句用于接收客户端传来的参数 dao d=new dao(); String zhuti3=(String)session.getAttribute("zhuti"); System.out.println("接收成功"); String shijian4=(String)session.getAttribute("shijian"); System.out.println(shijian4); System.out.println("接收成功"); String leixing3=(String)session.getAttribute("leixing"); System.out.println("接收成功"); String didian3=(String)session.getAttribute("didian"); System.out.println("接收成功"); ArrayList<s> rr=new ArrayList<s>(); rr=d.search(zhuti3,shijian4,leixing3,didian3); %> <table border="1" width="100%"> <tr> <th>活动主题</th> <th>活动目的</th> <th>活动类型</th> <th>活动时间</th> <th>活动地点</th> <th>活动对象</th> <th>活动安排</th> <th>活动日程安排</th> </tr> <% for(int i=0;i<rr.size();i++) { s in=rr.get(i); String zhuti=in.Getzhuti(); String mudi=in.Getmudi(); String leixing=in.Getleixing(); String shijian=in.Getshijian(); String didian=in.Getdidian(); String duixiang=in.Getduixiang(); String neirong=in.Getneirong(); String richeng=in.Getricheng(); %> <tr> <td><%=(zhuti) %></td> <td><%=(mudi) %></td> <td><%=(leixing) %></td> <td><%=(shijian) %></td> <td><%=(didian) %></td> <td><%=(duixiang) %></td> <td><%=(neirong) %></td> <td><%=(richeng) %></td> </tr> <% } %> </table> <input style="margin-left:230px;margin-top:90px;width:100px;height:60px" type = "button" value = "返回主菜单" onclick = "window.location.href = 'index.jsp'"> </body> </html>
标签:活动,JavaWeb,rr,期中考试,主题,2021,didian3,leixing3 From: https://www.cnblogs.com/Arkiya/p/16871960.html