A.Using HTTPS as a protocol
B.Using an LDAP security realm
C.Using HTTP Basic authentication
D.Using forms-based authentication
您可能感興趣的試卷
你可能感興趣的試題
A.javax.servlet.http.HttpServletRequest
B.javax.servlet.http.HttpSessionContext
C.javax.servlet.http.HttpServletResponse
D.javax.servlet.http.HttpSessionBindingEvent
E.javax.servlet.http.HttpSessionAttributeEvent
Users of your web application have requested that they should be able to set the duration of their sessions.So for example, one user might want a webapp to stay connected for an hour rather than the webapp’sdefault of fifteen minutes; another user might want to stay connected for a whole day. Furthermore, youhave a special login servlet that performs user authentication and retrieves the User object from the database. You want to augment this code to set up the user’s specified session duration.
Which codesnippet in the login servlet will accomplish this goal?()
A.User user = // retrieve the User object from the database session.setDurationInterval(user.getSessionDuration());
B.User user = // retrieve the User object from the database session.setMaxDuration(user.getSessionDuration());
C.User user = // retrieve the User object from the database session.setInactiveInterval(user.getSessionDuration());
D.User user=//retrieve the User object from the database session.setDuration(user.getSessionDuratio());
E.User user = // retrieve the User object from the database session.setMaxInactiveInterval(user.getSessionDuration());
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
A.javax.servlet.http.HttpSessionListener
B.javax.servlet.http.HttpSessionValueListener
C.javax.servlet.http.HttpSessionBindingListener
D.javax.servlet.http.HttpSessionAttributeListener
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.
最新試題
Which is true about the web container request processing model?()
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.
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 web browser need NOT always perform a complete request for a particular page that it suspects mightNOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partialresponse from the web server; this response includes information, such as the Last-Modified date but NOTthe body of the page.Which HTTP method will the browser use to retrieve such a partial response?()
Which is a benefit of precompiling a JSP page?()
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.
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.