Click the Exhibit button.
Given the JSP code:
1.<%
2.pageContext.setAttribute( "product",
3.new com.example.Product( "Pizza", 0.99 ) );
4.%>
5.<%-- insert code here --%>
Which two, inserted at line 5, output the name of the product in the response?()
B.<jsp:useBean id="product" class="com.example.Product" /> <%= product.getName()%>
C.<jsp:useBean id="com.example.Product" scope="page"> <%= product.getName()%></jspuseBean>
D.<jsp:useBean id="product" type="com.example.Product" scope="page" /><%= product.getName()%>
您可能感興趣的試卷
你可能感興趣的試題
Given: 10. 11.Product Name: 12.Product Price:
13. For a given product instance,which three jsp:setProperty attributes must be used to initialize its propertiesfrom the HTML form?()
A.id
B.name
C.type
D.param
E.property
A.Tag
B.Page
C.Taglib
D.Include
E.Variable
A.The tag handler must implement BodyTag.
B.The doAfterBody method is NOT called.
C.The setBodyContent method is called once.
D.It is never legal to return EVAL_BODY_BUFFERED from doStartTag.
最新試題
Given a Filter class definition with this method:21.public void doFilter(ServletRequest request,22.ServletResponse response,23.FilterChain chain)24.throws ServletException, IOException {25.// insert code here26.}Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
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?()
Click the 'Select and Place' button.Place the events in the order they occur.
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? ()
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?()
Which ensures that a JSP response is of type "text/plain"?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Which element of a web application deployment descriptor element is required?()
Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()