Requestdispatcher的forward方法和include方法的区别是forward可以到另外一个web应用的资源,而include只能到同一web的另外资源。
第1题:
Servlet通信方法包括哪些?()
第2题:
Storeand Forward存储和转发
第3题:
A.运用javax.serblet.http.HttpSerbletRequest接口的sendRedirect方法
B.运用javax.serblet.http.HttpSerbletResponse接口的sendRedirect方法
C.运用javax.serblet.RequestDispatcher接口的forward方法
D.运用javax.serblet.ResponseDispatcher接口的forward方法
第4题:
描述forward 和redirect的区别。
第5题:
Servlet A forwarded a request to servlet B using the forward method of RequestDispatcher. What attributein B’s request object contains the URI of the original request received by servlet A?()
第6题:
关于请求转发和请求重定向之间的区别有哪些?()
第7题:
Servlet里能实现重定向的方法有()
第8题:
forward 和redirect的区别
forward 是服务器请求资源,服务器直接访问目标地址的URL,把那个URL 的响应内容
读取过来,然后把这些内容再发给浏览器,浏览器根本不知道服务器发送的内容是从
哪儿来的,所以它的地址栏中还是原来的地址。
redirect 就是服务端根据逻辑,发送一个状态码,告诉浏览器重新去请求那个地址,一般来
说浏览器会用刚才请求的所有参数重新请求,所以session,request 参数都可以获取。
第9题:
Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface: public interface ApplicationController {public String invoke(HttpServletRequest request)} The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext. Which code snippet of the FrontController servlet accomplishes this goal?()
第10题:
下列说法正确的有()