单项选择题

You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the <title> tag that requires the page name tobe specified dynamically when the header is imported.
Which JSP code snippet performs the import of theheader content?()

 

A.<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:include>
B.<jsp:import page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:import>
C.<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:include>
D.<jsp:import page=’/WEB-INF/jsp/header.jsp’>. <jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:import>


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题Which is a benefit of precompiling a JSP page?()

A.It avoids initialization on the first request.
B.It provides the ability to debug runtime errors in the application.
C.It provides better performance on the first request for the JSP page.
D.It avoids execution of the _jspService method on the first request.

3.单项选择题

The JSP developer wants a comment to be visible in the final output to the browser.
Which comment styleneeds to be used in a JSP page?()


A.<!-- this is a comment -->
B.<% // this is a comment %>
C.<%-- this is a comment --%>
D.<% /** this is a comment **/ %>

4.多项选择题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>

6.多项选择题Given that a scoped attribute cart exists only in a user’s session, which two,taken independently,ensurethe scoped attribute cart no longer exists?()

A.${cart = null}
B.<c:remove var="cart" />
C.<c:remove var="${cart}" />
D.<c:remove var="cart" scope="session" />
E.<c:remove scope="session">cart</c:remove>

7.多项选择题

Given in a single JSP page:
<%@ taglib prefix=’java’ uri=’myTags’ %>
<%@ taglib prefix=’JAVA’ uri=’moreTags’ %> 
Which two are true?()

A.The prefix ’java’ is reserved.
B.The URI ’myTags’ must be properly mapped to a TLD file by the web container.
C.A translation error occurs because the prefix is considered identical by the web container.
D.For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.

8.单项选择题Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()

A.javax.servlet.http.HttpSessionListener
B.javax.servlet.http.HttpSessionBindingListener
C.javax.servlet.http.HttpSessionAttributeListener
D.javax.servlet.http.HttpSessionActivationListener

最新试题

Which is a benefit of precompiling a JSP page?()

题型:单项选择题

Click the 'Select and Place' button.Place the events in the order they occur.

题型:问答题

The JSP developer wants a comment to be visible in the final output to the browser.Which comment styleneeds to be used in a JSP page?()

题型:单项选择题

Which ensures that a JSP response is of type "text/plain"?()

题型:单项选择题

All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()

题型:单项选择题

You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35.Which two EL code snippets will return true for this condition? ()

题型:多项选择题

A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.Which two properly set the title in this scenario?()

题型:多项选择题

Which is true about the web container request processing model?()

题型:单项选择题

Click the ’Select and Place’ button.Place the events in the order they occur.

题型:问答题

You need to create a JSP that generates some JavaScript code to populate an array of strings used on the client-side.Which JSP code snippet will create this array?()

题型:单项选择题