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?()
A.
B.
C.
D.
您可能感興趣的試卷
你可能感興趣的試題
A.<realm-name>
B.<auth-method>
C.<security-role>
D.<transport-guarantee>
E.<web-resource-collection>
Given a Filter class definition with this method:
21.public void doFilter(ServletRequest request,
22.ServletResponse response,
23.FilterChain chain)
24.throws ServletException, IOException {
25.// insert code here
26.}
Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
A.chain.forward(request, response);
B.chain.doFilter(request, response);
C.request.forward(request, response);
D.request.doFilter(request, response);
You need to create a JSP that generates some JavaScript code to populate an array of strings used on the client-side.
Which JSP code snippet will create this array?()
A.
B.
C.
D.
Click the Exhibit button.
The attribute "name" has a value of "Foo,"
What is the result if this tag handler’s tag is invoked?()
A.Foo
B.done
C.Foodone
D.An exception is thrown at runtime
E.No output is produced from this code
最新試題
Click the 'Select and Place' button.Place the events in the order they occur.
Click the ’Select and Place’ button.Place the events in the order they occur.
Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()
Which is true about the web container request processing model?()
In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Click the ’Select and Place’ button.Place the events in the order they occur.
Which element of a web application deployment descriptor element is required?()
Which is a benefit of precompiling a JSP page?()
All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()