單項(xiàng)選擇題

You have built a web application with tight security. Several directories of your webapp are used for internal purposes and you have overridden the default servlet to send an HTTP 403 status code for any request thatmaps to one of these directories. During testing, the Quality Assurance director decided that they did NOTlike seeing the bare response page generated by Firefox and Internet Explorer. The director recommendedthat the webapp should return a more user-friendly web page that has the same look-and-feel as the webapp plus links to the webapp’s search engine. You have created this JSP page in the /WEB-INF/jsps/error403.jsp file. You do NOT want to alter the complex logic of the default servlet.
How can you declarethat the web container must send this JSP page whenever a 403 status is generated?()

A.
B.
C.
D.


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題

Click the Exhibit button.

As a maintenance feature, you have created this servlet to allow you to upload and remove files on yourweb server. Unfortunately, while testing this servlet, you try to upload a file using an HTTP request and onthis servlet, the web container returns a 404 status.
What is wrong with this servlet?()

A.HTTP does NOT support file upload operations.
B.The servlet constructor must NOT have any parameters.
C.The servlet needs a service method to dispatch the requests to the helper methods.
D.The doPut and doDelete methods do NOT map to the proper HTTP methods.

4.多項(xiàng)選擇題

You are creating a servlet that generates stock market graphs. You want to provide the web browser withprecise information about the amount of data being sent in the response stream. 
Which twoHttpServletResponse methods will you use to provide this information?()

A.response.setLength(numberOfBytes);
B.response.setContentLength(numberOfBytes);
C.response.setHeader("Length", numberOfBytes);
D.response.setIntHeader("Length", numberOfBytes);
E.response.setHeader("Content-Length", numberOfBytes);
F.response.setIntHeader("Content-Length", numberOfBytes);

最新試題

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:?jiǎn)柎痤}

Which element of a web application deployment descriptor  element is required?()

題型:?jiǎn)雾?xiàng)選擇題

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:?jiǎn)柎痤}

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:?jiǎn)柎痤}

The JSP developer wants a comment to be visible in the final output to the browser.Which comment styleneeds to be used in a JSP page?()

題型:?jiǎn)雾?xiàng)選擇題

Which ensures that a JSP response is of type "text/plain"?()

題型:?jiǎn)雾?xiàng)選擇題

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?()

題型:?jiǎn)雾?xiàng)選擇題

You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the <title> tag that requires the page name tobe specified dynamically when the header is imported.Which JSP code snippet performs the import of theheader content?() 

題型:?jiǎn)雾?xiàng)選擇題

Which three are true about servlet filters?()

題型:多項(xiàng)選擇題

Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()

題型:?jiǎn)雾?xiàng)選擇題