A. ServletResponse.encodeURL
B. HttpServletResponse.encodeURL
C. ServletResponse.encodeRedirectURL
D. HttpServletResponse.encodeRedirectURL
您可能感兴趣的试卷
你可能感兴趣的试题
What is the result when a request is sent to MyServlet?()
A. An IllegalStateException is thrown at runtime.
B. An InvalidSessionException is thrown at runtime.
C. The string “value=null” appears in the response stream.
D. The string “value=myAttributeValue” appears in the response stream.
Which statement, inserted at line 16, unbinds an attribute from a session?()
A. session.unbind(“key”);
B. session.remove(“key”);
C. session.removeAttribute(“key”);
D. session.unbindAttribute(“key”);
E. session.deleteAttribute(“key”);
A. Access to session-scoped attributes is guaranteed to be thread-safe by the web container.
B. To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.
C. If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.
D. The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.
Which two are true? ()
A. Tag files can only be accessed using a tagdir attribute.
B. The sort.jsp page translates successfully and invokes the tag defined by beta.tag.
C. The sort.jsp page produces a translation error because a taglib directive must always have a uri attribute.
D. Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB-INF/tags.
E. The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is created and added to the web application.
A. It may iterate over arrays, collections, maps and strings.
B. The body of the tag may contain EL code, but not scripting code.
C. When looping over collections, a loop status object may be used in the tag body.
D. It may iterate over a map, but only the key of the mapping may be used in the tag body.
E. When looping over integers (for example begin1=’1’ end=’10’), a loop status object may not be used in the tag body.
Which two are true?()
A. The prefix ‘java’ is reserved.
B. The URI ‘myTags’ must be properly mapped to a TLD file by the web container.
C. A translation error occurs because the prefix is considered identical by the web container.
D. For the tag usage
To implement the design intent, which statement must be inserted at line 42?()
A. session = response.getSession();
B. session = request.getSession();
C. session = request.getSession(true);
D. session = request.getSession(false);
E. session = request.getSession(“jsessionid”);
B. <c:remove var="cart" />
C. <c:remove var="${cart}" />
D. <c:remove var="cart" scope="session" />
E. <c:remove scope="session">cart</c:remove>
F. <c:remove var="${cart}" scope="session" />
G. <c:remove scope="session">${cart}</c:remove>
Which option prevents the exception thrown by my:errorProne from invoking the error page mechanism and outputs the message "File not found" in the response?()
A.A
B.B
C.C
D.D
E.E
A. javax.servlet.http.HttpSessionListener
B. javax.servlet.http.HttpSessionValueListener
C. javax.servlet.http.HttpSessionBindingListener
D. javax.servlet.http.HttpSessionAttributeListener
最新试题
Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”);What is the result?()
Which the three are true about servlet filters?()
Which code snippet, inserted at line 8, causes the value Company to be output?()
A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed. Which two are true? ()
Which the two are true regarding a web application class loader?()
Given that session is a valid HttpSession object: Int max = session.getAttribute(“MyReallyLongName”); Which is true?()
For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()
Which two authentication mechanisms provide weaker protection than other mechanisms?()
Which the two are characteristics of the Service Locator pattern?()
Given a web application in which the request parameter product ID contains a product identifier.Which two EL expressions evaluate the value of the product ID?()