单选题 After a merger with another small business, your company has inherited a legacy WAR file but the originalsource files were lost. After reading the documentation of that web application,you discover that the WARfile contains a useful tag library that you want to reuse in your own webapp packaged as a WAR file. What do you need to do to reuse this tag library?()
Simply rename the legacy WAR file as a JAR file and place it in your webapp’s library directory.
Unpack the legacy WAR file, move the TLD file to the META-INF directory, repackage the whole thingas a JAR file, and place that JAR file in your webapp’s library directory.
Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the whole thing as a JAR file, and place that JAR file in your webapp’slibrary directory.
Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the WAR, and place that WAR file in your webapp’s WEB-INF directory.
多选题 Given: 11. Which three EL expressions are valid and evaluate to true?()
${not map.c}
${map.d or map.a}
${map.a and map.d}
${map.false or map.true}
${map.a and map.b or map.a}
多选题 Which two are true regarding a web application class loader?()
A web application may override the web container’s implementation classes.
A web application running in a J2EE product may override classes in the javax.* namespace.
A web application class loader may NOT override any classes in the java.* and javax.* namespaces.
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.
多选题 A developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in athread-safe manner. Which two can support this design goal?()
Store the data in a local variable.
Store the data in an instance variable.
Store the data in the HttpSession object.
Store the data in the ServletContext object.
Store the data in the ServletRequest object.
单选题 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?()
Create an HttpSessionListener class and implement the sessionInitialized method with that block ofcode.
Create an HttpSessionActivationListener class and implement the sessionCreated method with thatblock of code.
Create a Filter class, call the getSession(false) method, and if the result was null, then execute that block of code.
Create an HttpSessionListener class and implement the sessionCreated method with that block of code.