网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

jsp:forward和sendRedirect都是用来做页面跳转的,描述错误的是?()

  • A、forward之后可以使用原来的request对象,而且效率较高
  • B、sendRedirect之后不可以使用原来的request对象,而且效率较低
  • C、forward地址栏不变化,只能在Web应用程序内的页面间跳转
  • D、forward地址栏变化,可以跳转到任何页面和机器

参考答案

更多 “jsp:forward和sendRedirect都是用来做页面跳转的,描述错误的是?()A、forward之后可以使用原来的request对象,而且效率较高B、sendRedirect之后不可以使用原来的request对象,而且效率较低C、forward地址栏不变化,只能在Web应用程序内的页面间跳转D、forward地址栏变化,可以跳转到任何页面和机器” 相关考题
考题 在J2EE中,对于标记,描述正确的是()。 A.jsp:param是jsp:include、jsp:forward标记的子标记B.如果aa.jsp有代码:jsp:forwardpage=next.jspjsp:paramname=namevalue=jb-aptech//jsp:forward,则在next.jsp中可以使用request.getParameter(name);把属性name的值取出来C.如果aa.jsp有代码:jsp:forwardpage=next.jspjsp:paramname=namevalue=jb-aptech//jsp:forward,则在next.jsp中可以使用request.getAttribute(name);把属性name的值取出来D.如果jsp:param标记不放在jsp:forward标记内,也就是不作为jsp:forward标记的子标记,则使用浏览器查看时会显示错误页面

考题 在J2EE中,在aa.jsp中有行代码:%request.setAttribute(Co.,jb-aptech%request.setAttribute(Co.,jb-aptech);%在bb.jsp中有行代码:%out.println((String)request.getAttribute(Co.));%为了使得在bb.jsp中的如上代码可以显示jb-aptech”,可以使用()方法。A.在aa.jsp中使用formmethod=postaction=bb.jsp把请求提交到bb.jspB.在aa.jsp中使用jsp:forwardfile=bb.jsp/把页面重定向到bb.jspC.在aa.jsp中使用%response.sendRedirect(bb.jsp);%把页面重定向到bb.jspD.在aa.jsp中使用%@includefile=bb.jsp%包含页面bb.jspE.在aa.jsp中使用%config.getServletContext().getRequestDispatcher(/bb.jsp).forward(request,response);%把页面重定向到bb.jsp

考题 下列选项中能在JSP页面中实现转向的是() A.Response.forward(“/index.jsp”)B.Response.sendRedirect(“/index.jsp”)C.request.forward(“/index.jsp”)D.request.sendRedirect(“/index.jsp”)

考题 能够保留请求作用域中数据的转向方式是()。A、response.forward()B、response.sendRedirect()C、session.getRequestDispatcher().forward(request,response)D、request.getRequestDispatcher().forward(request,response)

考题 sendRedirect之后不可以使用原来的request对象,而且效率较低。

考题 在Servlet里,能实现跳转的方法有()。A、运用javax.servlet.http.HttpServletRequest接口的sendRedirect方法B、运用javax.servlet.http.HttpServletResponse接口的sendRedirect方法C、运用javax.servlet.RequestDispatcher接口的forward方法D、运用javax.servlet.ResponseDispatcher接口的forward方法

考题 关于请求转发和请求重定向之间的区别有哪些?()A、RequestDispatcher对象指定的URL是相对于当前WEB应用程序的根目录,而sendRedirect方法中的URL是相对于整个WEB站点的根目录。B、调用sendRedirect方法重定向的访问过程结束后,浏览器地址栏中显示的URL会改变;而调用forward方法就不会改变C、sendRedirect方法响应的结果就是告诉浏览器去重新发出对另外一个URL的访问请求。Forward方法在服务器端内部将请求转发给另外一个资源。D、forward方法的request对象和response对象属于同一个访问请求和响应过程;而sendRedirect方法的request对象和response对象属于两个独立的访问请求和响应过程E、无论是forward方法,还是sendRedirect方法,在调用它们之前,都不能有内容已经被实际输出到了客户端

考题 在JSP页面编程中,页面跳转可以采用如下哪种方法实现?()A、response.forwardB、request.includeC、response.sendRedirectD、request.setAttribute

考题 在J2EE中,在aa.jsp中有行代码:  %%  request.setAttribute("Co.","jb-aptech");  %  在bb.jsp中有行代码: %  out.println((String)request.getAttribute("Co."));  %    %   为了使得在bb.jsp中的如上代码可以显示“jb-aptech”,可以使用()方法。A、在aa.jsp中使用form method=post action="bb.jsp"把请求提交到bb.jsp B、在aa.jsp中使用jsp:forward file="bb.jsp" /把页面重定向到bb.jsp  C、在aa.jsp中使用%  response.sendRedirect("bb.jsp");  %把页面重定向到bb.jsp D、在aa.jsp中使用%@ include file="bb.jsp" %包含页面bb.jsp  E、在aa.jsp中使用% config.getServletContext().getRequestDispatcher("/bb.jsp").forward(request,response); %把页面重定向到bb.jsp

考题 在J2EE中,对于标记,描述正确的是()。     A、jsp:param是jsp:include、jsp:forward标记的子标记  B、如果aa.jsp有代码:jsp:forward page="next.jsp"jsp:param name="name" value="jb-aptech" //jsp:forward,则在next.jsp中可以使用request.getParameter("name");把属性name的值取出来 C、如果aa.jsp有代码:jsp:forward page="next.jsp"jsp:param name="name" value="jb-aptech" //jsp:forward,则在next.jsp中可以使用request.getAttribute("name");把属性name的值取出来 D、如果jsp:param标记不放在jsp:forward标记内,也就是不作为jsp:forward标记的子标记,则使用浏览器查看时会显示错误页面

考题 在JSP中需要将1.jsp的请求数据通过2.jsp转发给3.jsp,应该在2.jsp中采用()方式实现。A、〈%request.sendRedirect(“3.jsp”)%〉B、〈%response.sendRedirect(“3.jsp”)%〉C、〈%request.getRequestDispatcher(“3.jsp”).forward(request,response)%〉D、〈%response.sentRedirect(“32.jsp”).forward(request,response)%〉

考题 forward地址栏不变化,只能在Web应用程序内的页面间跳转。

考题 forward之后可以使用原来的request对象,而且效率较高。

考题 阅读下面代码片段: RequestDispatcher dispatcher=request.getRequestDispatcher("a.jsp"); dispatcher.forward(request,response); 关于该段代码的作用,下列叙述哪项是正确的?()A、页面重定向到a.jsp页面B、将请求转发到a.jsp页面C、从a.jsp定向到当前页面D、从a.jsp转发到当前页面

考题 forward地址栏变化,可以跳转到任何页面和机器。

考题 sendRedirect和Forward机制的区别主要在于()。A、sendRedirect发送状态码给客户端浏览器B、sendRedirect丢失HttpServletRequest对象C、forward发送请求给其他Web资源时,不使用客户端浏览器D、forward传送HttpServletRequest和HttpServletResponse对象给其他Web资源

考题 多选题在J2EE中,在aa.jsp中有行代码:   在bb.jsp中有行代码:        为了使得在bb.jsp中的如上代码可以显示“jb-aptech”,可以使用()方法。A在aa.jsp中使用form method=post action=bb.jsp把请求提交到bb.jspB在aa.jsp中使用jsp:forward file=bb.jsp /把页面重定向到bb.jspC在aa.jsp中使用%  response.sendRedirect(bb.jsp);  %把页面重定向到bb.jspD在aa.jsp中使用%@ include file=bb.jsp %包含页面bb.jspE在aa.jsp中使用% config.getServletContext().getRequestDispatcher(/bb.jsp).forward(request,response); %把页面重定向到bb.jsp

考题 单选题能够保留请求作用域中数据的转向方式是()。A response.forward()B response.sendRedirect()C session.getRequestDispatcher().forward(request,response)D request.getRequestDispatcher().forward(request,response)

考题 单选题下列选项中能在JSP页面中实现转向的是()A  Response.forward(“/index.jsp”)B  Response.sendRedirect(“/index.jsp”)C  request.forward(“/index.jsp”)D  request. sendRedirect (“/index.jsp”)

考题 判断题sendRedirect之后不可以使用原来的request对象,而且效率较低。A 对B 错

考题 多选题在J2EE中,对于标记,描述正确的是()。Ajsp:param是jsp:include、jsp:forward标记的子标记B如果aa.jsp有代码:jsp:forward page=next.jspjsp:param name=name value=jb-aptech //jsp:forward,则在next.jsp中可以使用request.getParameter(name);把属性name的值取出来C如果aa.jsp有代码:jsp:forward page=next.jspjsp:param name=name value=jb-aptech //jsp:forward,则在next.jsp中可以使用request.getAttribute(name);把属性name的值取出来D如果jsp:param标记不放在jsp:forward标记内,也就是不作为jsp:forward标记的子标记,则使用浏览器查看时会显示错误页面

考题 判断题forward地址栏不变化,只能在Web应用程序内的页面间跳转。A 对B 错

考题 单选题jsp:forward和sendRedirect都是用来做页面跳转的,描述错误的是?()A forward之后可以使用原来的request对象,而且效率较高B sendRedirect之后不可以使用原来的request对象,而且效率较低C forward地址栏不变化,只能在Web应用程序内的页面间跳转D forward地址栏变化,可以跳转到任何页面和机器

考题 判断题forward地址栏变化,可以跳转到任何页面和机器。A 对B 错

考题 判断题forward之后可以使用原来的request对象,而且效率较高。A 对B 错

考题 单选题在JSP中需要将1.jsp的请求数据通过2.jsp转发给3.jsp,应该在2.jsp中采用()方式实现。A 〈%request.sendRedirect(“3.jsp”)%〉B 〈%response.sendRedirect(“3.jsp”)%〉C 〈%request.getRequestDispatcher(“3.jsp”).forward(request,response)%〉D 〈%response.sentRedirect(“32.jsp”).forward(request,response)%〉

考题 多选题在Servlet里,能实现跳转的方法有()。A运用javax.servlet.http.HttpServletRequest接口的sendRedirect方法B运用javax.servlet.http.HttpServletResponse接口的sendRedirect方法C运用javax.servlet.RequestDispatcher接口的forward方法D运用javax.servlet.ResponseDispatcher接口的forward方法