下列不能够将页面跳转到a.jsp的是:
A: response.sendRedirect(“a.jsp”);
B: request.getRequestDispatcher("a.jsp").forward(request,response);
C: request.setAttribute(“a”,”a.jsp”);
D: response.setHeader("refresh","2;URL=a.jsp");
A: response.sendRedirect(“a.jsp”);
B: request.getRequestDispatcher("a.jsp").forward(request,response);
C: request.setAttribute(“a”,”a.jsp”);
D: response.setHeader("refresh","2;URL=a.jsp");
举一反三
- 有a.jsp,b.jsp页面,分别显示a,b字符,则从a.jsp页面通过response.sendRedirect(“b.jsp”)此时页面显示结果为(),a.jsp页面通过request.getRequestDispatcher(“b.jsp”).forward(“b.jsp”).forward(request,response)页面显示结果为 。a.jsp页面通过request.getRequestDispatcher(“b.jsp”).include (“b.jsp”).forward(request,response)页面显示结果为 A: b B: ab C: a D: ba
- 阅读下面代码片段:RequestDispatcher dispatcher=request.getRequestDispatcher("a.jsp");dispatcher.forward(request,response);
- 【单选题】RequestDispatcher dispatcher=request.getRequestDispatcher("a.jsp"); dispatcher.forward(request,response); 关于该段代码的作用,下列叙述哪项是正确的? () A. 页面重定向到a.jsp页面 B. 将请求转发到a.jsp页面 C. 从a.jsp定向到当前页面 D. 从a.jsp转发到当前页面
- RequestDispatcher dispatcher=request.getRequestDispatcher("a.jsp"); dispatcher.forward(request,response); 关于该段代码的作用,下列叙述哪项是正确的?
- 在JSP中,重定向到另一个页面,以下哪项是正确的() A: request . sendRedirect(“http://www.hncu.net”); B: request . sendRedirect(); C: response . sendRedirect(“http://www.hncu.net”); D: response .sendRedirect();