移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

计算机考试 | Java认证考试

题库
练习
考试
资讯

模式切换

0 0 0
我的错题 我的收藏 学习笔记

章节目录

单选题 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?()

A

Simply rename the legacy WAR file as a JAR file and place it in your webapp’s library directory.

B

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.

C

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.

D

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

A

${not map.c}

B

${map.d or map.a}

C

${map.a and map.d}

D

${map.false or map.true}

E

${map.a and map.b or map.a}

多选题 Which 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.* namespaces.

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.

多选题 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?()

A

Store the data in a local variable.

B

Store the data in an instance variable.

C

Store the data in the HttpSession object.

D

Store the data in the ServletContext object.

E

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

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.

1 2 3 4 5 下一页 尾页 /

到第