A.<class><br/>
B.<webapp><br/>
C.<servlet><br/>
D.<codebase><br/>
E.<servlet-class>
您可能感興趣的試卷
你可能感興趣的試題
Given:
11.public class MyServlet extends HttpServlet {
12.public void service(HttpServletRequest request,
13.HttpServletResponse response)
14.throws ServletException, IOException {
15.// insert code here
16.}
17.}
and this element in the web application’s deployment descriptor:
<error-page>
<error-code>302</error-code>
<location>/html/error.html</location>
</error-page>
Which,inserted at line 15,causes the container to redirect control to the error.html resource?()
A.response.setError(302);
B.response.sendError(302);
C.response.setStatus(302);
D.response.sendRedirect(302);
E.response.sendErrorRedirect(302);
You want to create a valid directory structure for your Java EE web application, and your application usestag files and a JAR file.
Which three must be located directly in your WEB-INF directory(NOT in asubdirectory of WEB-INF)?()
A.The JAR file
B.A directory called lib
C.A directory called tags
D.A directory called TLDs
E.A directory called classes
F.A directory called META-INF
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.
Given:
10.public void service(ServletRequest request,
11.ServletResponse response) {
12.ServletInputStream sis =
13.// insert code here
14.}
Which retrieves the binary input stream on line 13?()
A.request.getWriter();
B.request.getReader();
C.request.getInputStream();
D.request.getResourceAsStream();
最新試題
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 ensures that a JSP response is of type "text/plain"?()
Your company has a corporate policy that prohibits storing a customer’s credit card number in anycorporate database. However, users have complained that they do NOT want to re- enter their credit cardnumber for each transaction. Your management has decided to use client-side cookies to record the user’scredit card number for 120 days. Furthermore, they also want to protect this information during transit fromthe web browser to the web container; so the cookie must only be transmitted over HTTPS.Which codesnippet creates the "creditCard" cookie and adds it to the out going response to be stored on the user’s webbrowser?()
Which is a benefit of precompiling a JSP page?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Which two are valid and equivalent?()
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.
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.