多項選擇題

Given the two security constraints in a deployment descriptor:
101.<security-constraint>
102.<!--a correct url-pattern and http-method goes here--> 
103.<auth-constraint><role-name>SALES</role-name></auth- . <auth-constraint>
104.<role-name>SALES</role-name>
105.</auth-constraint>
106.</security-constraint>
107.<security-constraint>
108.<!--a correct url-pattern and http-method goes here--> 
109.<!-- Insert an auth-constraint here -->
110.</security-constraint>
If the two security constraints have the same url-pattern and http-method
which two inserted independentlyat line 109,will allow users with role names of either SALES or MARKETING to access this resource?()

A.<auth-constraint/>
B.<auth-constraint><role-name>*</role-name></auth-constraint>
C.<auth-constraint><role-name>ANY</role-name></auth-constraint>
D.<auth-constraint><role-name>MARKETING</role-name></auth-constraint>


您可能感興趣的試卷

你可能感興趣的試題

1.單項選擇題Which mechanism requires the client to provide its public key certificate?()

A.HTTP Basic Authentication
B.Form Based Authentication
C.HTTP Digest Authentication
D.HTTPS Client Authentication

2.單項選擇題Which activity supports the data integrity requirements of an application?()

A.Using HTTPS as a protocol
B.Using an LDAP security realm
C.Using HTTP Basic authentication
D.Using forms-based authentication

3.多項選擇題Which two classes or interfaces provide a getSession method?()

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

4.單項選擇題

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

5.單項選擇題

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

最新試題

You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies:20.<input type=’radio’ name=’hobbyEnum’ value=’HIKING’>Hiking <br>21.<input type=’radio’ name=’hobbyEnum’ value=’SKIING’>Skiing <br>22.<input type=’radio’ name=’hobbyEnum’ value=’SCUBA’>SCUBA Diving23.<!-- and more options -->After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname.Which EL code snippet will display Nth element of the user’s selected hobbies?()

題型:單項選擇題

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

題型:單項選擇題

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.

題型:問答題

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

題型:單項選擇題

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

題型:問答題

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

題型:單項選擇題