單項(xiàng)選擇題

Which method must be used to encode a URL passed as an argument to HttpServletResponse.sendRedirect when using URL rewriting for session tracking?()

A.ServletResponse.encodeURL
B.HttpServletResponse.encodeURL
C.ServletResponse.encodeRedirectURL
D.HttpServletResponse.encodeRedirectURL


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題Which interface must a class implement so that instances of the class are notified after any object is addedto a session?()

A.javax.servlet.http.HttpSessionListener
B.javax.servlet.http.HttpSessionValueListener
C.javax.servlet.http.HttpSessionBindingListener
D.javax.servlet.http.HttpSessionAttributeListener

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

In your web application,you need to execute a block of code whenever the session object is first created.
Which design will accomplish this goal?()

A.Create an HttpSessionListener class and implement the sessionInitialized method with that block ofcode.
B.Create an HttpSessionActivationListener class and implement the sessionCreated method with thatblock of code.
C.Create a Filter class, call the getSession(false) method, and if the result was null, then execute that block of code.
D.Create an HttpSessionListener class and implement the sessionCreated method with that block of code.

3.單項(xiàng)選擇題What is the purpose of session management?()

A.To manage the user’s login and logout activities.
B.To store information on the client-side between HTTP requests.
C.To store information on the server-side between HTTP requests.
D.To tell the web container to keep the HTTP connection alive so it can make subsequent requestswithout the delay of making the TCP connection.

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

A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code:
1.<%@ taglib prefix="x"
2.tagdir="/WEB-INF/tags/alpha" %>
3.<x:beta />
The sort.jsp page is requested.
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 uriattribute.
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 createdand added to the web application.

最新試題

Which is a benefit of precompiling a JSP page?()

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

Which is true about the web container request processing model?()

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

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

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

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

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

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

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

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

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

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

題型:問答題

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

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

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

題型:問答題

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

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