In ServletContext.getNamedDispatcher(string arg0) arg0 is the

In ServletContext.getNamedDispatcher(string arg0) arg0 is the

In ServletContext.getNamedDispatcher(string arg0) arg0 is the

A.
url of a servlet relative to the ServletRequest

B.
url of a servlet relative to the Context

C.
name of a servlet

D.
absolute url to any servlet in any Context



Leave a Reply 4

Your email address will not be published. Required fields are marked *


ZdeDu

ZdeDu

C

RequestDispatcher getNamedDispatcher(java.lang.String name)

Returns a RequestDispatcher object that acts as a wrapper for the named servlet.
Servlets (and JSP pages also) may be given names via server administration or via a web application deployment descriptor. A servlet instance can determine its name using ServletConfig#getServletName.

This method returns null if the ServletContext cannot return a RequestDispatcher for any reason.

Parameters:
name – a String specifying the name of a servlet to wrap
Returns:
a RequestDispatcher object that acts as a wrapper for the named servlet, or null if the ServletContext cannot return a RequestDispatcher
See Also:
RequestDispatcher, ServletContext#getContext, ServletConfig#getServletName

Allan Santos

Allan Santos

C indeed