移动端

  • 题王微信公众号

    题王微信公众号

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

计算机考试 | Java认证考试

题库
练习
考试
资讯

模式切换

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

章节目录

多选题 You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()

A

In the init method.

B

In the jspInit method.

C

In the constructor of the JSP’s Java code.

D

In a JSP declaration, which includes an initializer block.

E

In a JSP declaration, which includes a static initializer block.

单选题 Which statement is true about web container session management?()

A

Access to session-scoped attributes is guaranteed to be thread-safe by the web container.

B

To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.

C

If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.

D

The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.

单选题 Given an HttpSession session,a ServletRequest request,and a ServletContext context,which retrieves aURL to /WEB-INF/myconfig.xml within a web application?()

A

session.getResource(/WEB-INF/myconfig.xml)

B

request.getResource(/WEB-INF/myconfig.xml)

C

context.getResource(/WEB-INF/myconfig.xml)

D

getClass().getResource(/WEB-INF/myconfig.xml)

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

多选题 Given: 3.class MyServlet extends HttpServlet { 4.public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException,IOException { 5.// servlet code here ... 26.} 27.} If the DD contains a single security constraint associated with MyServlet and its only  tagsand  tags are:GETPUT Admin Which four requests would be allowed by the container?()

A

A user whose role is Admin can perform a PUT.

B

A user whose role is Admin can perform a GET.

C

A user whose role is Admin can perform a POST.

D

A user whose role is Member can perform a PUT.

E

A user whose role is Member can perform a POST.

F

A user whose role is Member can perform a GET.

多选题 Which two actions protect a resource file from direct HTTP access within a web application?()

A

Placing it in the /secure directory

B

Placing it in the /WEB-INF directory

C

Placing it in the /META-INF/secure directory

D

Creating a  element within the deployment descriptor

首页 上一页 1 2 3 4 5 下一页 尾页 /

到第