public class OneServlet extends HttpServlet { private static final long serialVersionUID = 1L; private String name;//加入的私有变量 public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { name=request.getParameter("name"); Thread.sleep(60*60);// response.getWriter().write("this is:"+name); } catch (InterruptedException e) { e.printStackTrace(); } } }
当在浏览器同时提交“http://localhost:8080/day08_3/oneServlet?name=jack”
和”http://localhost:8080/day08_3/oneServlet?name=rose“为什么只会显示一个结果