移动端

  • 题王微信公众号

    题王微信公众号

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

计算机考试 | Java认证考试

题库
练习
考试
资讯

模式切换

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

章节目录

单选题 Servlet A forwarded a request to servlet B using the forward method of RequestDispatcher. What attributein B’s request object contains the URI of the original request received by servlet A?()

A

REQUEST_URI

B

javax.servlet.forward.request_uri

C

javax.servlet.forward.REQUEST_URI

D

javax.servlet.request_dispatcher.request_uri

E

javax.servlet.request_dispatcher.REQUEST_URI

多选题 Which two are valid and equivalent?()

A

<%! int i; %>

B

<%= int i; %>

C

<jsp:expr>int i;</jsp:expr>

D

<jsp:scriptlet>int i;</jsp:scriptlet>

E

<jsp:declaration>int i;</jsp:declaration>

多选题 Given an EL function declared with:11.  12.spin 13.com.example.Spinner 14. 15.java.lang.String spinIt() 16. 17. Which two are true?()

A

The function method must have the signature: public 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.

多选题 A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal?()

A

Include a listener directive in a JSP page

B

configure a listener in the TLD file using the  element

C

Include a  element in the web application deployment descriptor

D

configure a listener in the application deployment descriptor, using the  element

E

Include a class implementing ServletContextListener as part of the web application deploymen

多选题 Given: http://com.example/myServlet.jsp?num=one&num=two&num=three. Which two produce the output"one, two and three"?()

A

${param.num[0],[1] and [2]}

B

${paramValues[0],[1] and [2]}

C

${param.num[0]}, ${param.num[1]} and ${param.num[2]}

D

${paramValues.num[0]}, ${paramValues.num[1]} and ${paramValues.num[2]}

E

${paramValues[num][0]}, ${paramValues[num][1]} and ${paramValues[num][2]}

单选题 Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface: public interface ApplicationController {public String invoke(HttpServletRequest request)} The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext. Which code snippet of the FrontController servlet accomplishes this goal?()

A

Dispatcher view=context.getDispatcher(viewURL);view.forward Request(request, response);

B

Dispatcher view=request.getDispatcher(viewURL);view.forward Request(request, response);

C

RequestDispatcher view. =context.getRequestDispatcher(viewURL);view.forward(request,response);

D

RequestDispatcher view=request.getRequestDispatcher(viewURL);view.forward(request, response);

单选题 You have created a web application that you license to real estate brokers. The webapp is highly customizable including the email address of the broker, which is placed on the footer of each page. This isconfigured as a context parameter in the deployment descriptor: 10. 11.footerEmail 12.joe@estates-r-us.biz 13. Which EL code snippet will insert this context parameter into the footer?()

A

<a href=’mailto:${footerEmail}’>Contact me</a>

B

<a href=’mailto:${initParam@footerEmail}’>Contact me</a>

C

<a href=’mailto:${initParam.footerEmail}’>Contact me</a>

D

<a href=’mailto:${contextParam@footerEmail}’>Contact me</a>

E

<a href=’mailto:${contextParam.footerEmail}’>Contact me</a>

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

到第