移动端

  • 题王微信公众号

    题王微信公众号

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

计算机考试 | Java认证考试

题库
练习
考试
资讯

模式切换

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

章节目录

单选题 What is the result()?

A

 Compilation will succeed.

B

 Compilation will fail at line 5.

C

 Compilation will fail at line 6.

D

 Compilation will fail at line 14.

E

 Compilation will fail at line 17.

单选题 Given an HttpServlet Request request and Http Servlet Response response, which sets a cookie “username” with the value “joe” in a servlet.?()

A

 request.add Cookie (“username”. “joe”)

B

 request.set Cookie (“username, “joe”)

C

 response.add Cookie (username”, “joe”))

D

 request.add Header (new Cookie (“username”, “joe”))

E

 request.add Cookie (new Cookie (“username”, “joe”))

F

 response.add Cookie (new Cookie (“username”, “joe”))

G

 response.add Header (new Cookie (“username”, “joe”))

单选题 Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map, which two are valid invocations of function foo?()

A

 ${func(1)}

B

 ${foo:func(4)}

C

 ${func:foo(2)}

D

 ${foo(5):func}

E

 ${func:foo(“easy”)}

F

 ${func:foo(“3”).name}

多选题 For a given Servlet Response response, which two retrieve an object for writing text data? ()

A

 response.get Writer ()

B

 response.get Output Stream ()

C

 response.get Output Writer ()

D

 response.get Writer ().get Output Stream()

E

 response.get Writer (Writer.OUTPUT_TEXT)

单选题 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

多选题 Given a header in an HTTP request: X-Retries:4  Which two retrieve the value of the header from a given ServletRequest request? ()

A

 request.getHeader (“X-Retries”)

B

 request.getIntHeader (“X-Retries”)

C

 request.getRequestHeader (“x-Retries”)

D

 request.getHeaders (“X-Retries”).get (0)

E

 re request.getRequest Headers (“X-Retries”). Get (0)

单选题 Which retrieves all cookies sent in a given HttpSErvletRequest request?()

A

 request.getCookies()

B

 request.getAttributes()

C

 request.getSession ().getCookies()

D

 request.getSession (). GetAttributes()

单选题 What is the result when a request is sent to MyServlet?()

A

 An IllegalStateException is thrown at runtime.

B

 An InvalidSessionException is thrown at runtime.

C

 The string “value=null” appears in the response stream.

D

 The string “value=myAttributeValue” appears in the response stream.

多选题 Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()

A

 The tag is invoked without a body.

B

 The doTAb method throws an exception.

C

 The  element has the value empty.

D

 The tag is called with the attribute skip-body=true

多选题 Which two are true?()

A

 The function method must have the signaturepublic: String spin().

B

 The method must be mapped to the logical name “spin” in the web.xml file.

C

 The function method must have the signature:public String spinIt().

D

 The function method must have the signature:public static String spin().

E

 The function method must have the signature:public static String spinIT().

F

 The function class must be named Spinner, and must be in the package com.example.

1 2 3 4 5 下一页 尾页 /

到第