<span style="font-family:FangSong_GB2312;font-size:18px;">import java.text.*;
import java.util.*;
import java.io.*;
import javax.servlet.http.*;
import javax.servlet.*;
import com.bjpowernode.exam.model.*;
import com.bjpowernode.exam.manager.*;
public class SearchStudentServlet extends HttpServlet {
public void doGet(HttpServletRequest request?? HttpServletResponse response)
throws ServletException?? IOException {
doPost(request?? response);
}
public void doPost(HttpServletRequest request?? HttpServletResponse response)
throws ServletException?? IOException {
String sBeginDate = request.getParameter("beginDate");
String sEndDate = request.getParameter("endDate");
Date beginDate = new Date();
Date endDate = new Date();
try {
beginDate = new SimpleDateFormat("yyyy-MM-dd").parse(sBeginDate);
endDate = new SimpleDateFormat("yyyy-MM-dd").parse(sEndDate);
}catch(Exception e) {
e.printStackTrace();
}
StudentManager studentManager = new StudentManagerImpl();
List<Student> studentList = studentManager.findStudentList(beginDate?? endDate);
//??????б??????requet??Χ??
//request.setAttribute("student_list"?? studentList);
//??????????????????????????????????????
//request.getRequestDispatcher("/student_list.jsp").forward(request?? response);
//??studentList???session??
HttpSession session = request.getSession();
session.setAttribute("student_list"?? studentList);
//???????????request
//????д???????? "/"??????8080???
//response.sendRedirect("/student_list.jsp");
response.sendRedirect(request.getContextPath() + "/student_list.jsp");
}
}</span>

??????????波????????????????Jsp????????servlet?е????????????????????£?
??????????:
????<span style="font-family:FangSong_GB2312;font-size:18px;">//??????????????????????????????????????
????request.getRequestDispatcher("/student_list.jsp").forward(request?? response);</span>
?????????????????????????????????request/response???????????????????????????????????????????????????A??????????м??B??????C??D?? ???????????????