移动端

  • 题王微信公众号

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

计算机考试 | Java认证考试

模式切换

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

章节目录

多选题 Click the Exhibit button. A servlet sets a session-scoped attribute product with an instance of com.example.Product and forwards toa JSP. Which two output the name of the product in the response?()

A

${product.name}

B

<jsp:getProperty name="product" property="name" />

C

<jsp:useBean id="com.example.Product" /><%= product.getName() %>

D

<jsp:getProperty name="product" class="com.example.Product" property="name" />

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

A

Request.getHeader(X-Retries)

B

Request.getIntHeader(X-Retries)

C

Request.getRequestHeader(X-Retries)

D

Request.getHeaders(X-Retries).get(0)

E

Request.getRequestHeaders(X-Retries).get(0)

单选题 Your web application views all have the same header, which includes the  tag in the  elementof the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put itinto a single JSP called /WEB-INF/jsp/header.jsp. However, the title of each page is unique, so you havedecided to use a variable called pageTitle to parameterize this in the header JSP, like this: 10.${param.pageTitle} Which JSP code snippet should you use in your main view JSPs to insert the header and pass thepageTitle variable?()

A

<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:insert>

B

<jsp:include page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>

C

<jsp:include file=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>

D

<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:insert>

E

<jsp:include page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:include>

单选题 Which JSTL code snippet can be used to perform URL rewriting?()

A

<a href=’<c:url url=foo.jsp/>’ />

B

<a href=’<c:link url=foo.jsp/>’ />

C

<a href=’<c:url value=foo.jsp/>’ />

D

<a href=’<c:link value=foo.jsp/>’ />

1 2 3 4 5 下一页 尾页 /

到第