多项选择题

Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two changes, taken together, ensure that value is equal to “Hello” on line 23? ()

A.A
B.B
C.C
D.D
E.E


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

Given the HttpServlet code:  
getServletContext().setAttribute(“foo”, “value”);
What is the result?()

A. The attribute foo is placed in the application
B. A ServletContextListener registered for that servlet is notified
C. A ServletAttributeListener registered for that servlet is notified
D. An HttpSessionAttributeListener registered for that servlet is notified

2.单项选择题Which is the true choice about the web container request processing model()?

A. The init method on a filter is called the first time a servlet mapped to that filter is invoked
B. A filter defined for a servlet must always forward control to the next resource in the filter chain.
C. Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file
D. If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it

3.多项选择题Which the two are true regarding a web application class loader?()

A. A web application may override the web container’s implementation classes
B. A web application running in a J2EE product may override classes in the javax.* namespace
C. A web application class loader may NOT override any classes in the java.* and javax.*  namespace
D. Resources in the WAR class directory or in any of the JAR files within the library directory may  be accessed using the J2SE semantics of getResource
E. Resources in the WAR class directory or in any of the JAR files within the library directory  cannot be accessed using the J2SE semantics of getResource

5.单项选择题Which path, relative to a web application’s root, identifies the web application’s deployment descriptor?()

A. /conf/web.xml
B. /WEB-INF/web.xml
C. /conf/server.xml
D. /META-INF/web.xml
E. /WEB-INF/rules.xml
F. /META-INF/server. Xml

6.多项选择题


Which two are true()

A. Line 13 is not valid for a servlet declaration
B. Line 14 is not valid for a servlet declaration
C. One instance of the servlet will be loaded at startup
D. Ten instance of the servlet will be loaded at start up
E. the servlet will be referenced by the name catalog in mappings

7.单项选择题When using Form Based Authentication, which pair of fields must be used in the login form?()  

A. j_user and j_id
B. j_id and j_password
C. j_users and j_password
D. j_user and j_password
E. j_login and j_password
F. j_username and j_password

8.单项选择题


What else must the developer do to ensure that the intended security goal is achieved()?  

A. Create a user called vip in the security realm
B. Define a group within the security realm and call it vip
C. Define a security-role named vip in the development descriptor
D. Declare a security-role-ref for vip in the deployment descriptor

9.多项选择题Which two authentication mechanisms provide weaker protection than other mechanisms?()

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

最新试题

Which two are true()

题型:多项选择题

Which three are guaranteed to be valid for the  element of a web application deployment descriptor?()

题型:多项选择题

Which two authentication mechanisms provide weaker protection than other mechanisms?()

题型:多项选择题

The tag handler for n:recurse extends SimpleTagSupport.Assuming an n:recurse tag can either contain an empty body or another n:recurse tag, which strategy allows the tag handler for n:recurse to output the nesting depth of the deepest n:recurse tag?()  

题型:单项选择题

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 valid and equivalent?()

题型:多项选择题

Which the three are true about servlet filters?()

题型:多项选择题

A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.Company.  Product class with a name property of “The Matrix” and price property of 39.95. Given the JSP page code snippet:What is the response output of this JSP page code snippet? ()

题型:单项选择题

Which path, relative to a web application’s root, identifies the web application’s deployment descriptor?()

题型:单项选择题

Which two produce the output "one, two and three"?()

题型:多项选择题