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" />
您可能感興趣的試卷
你可能感興趣的試題
A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. Thisattribute holds an instance of the com.example.Product class with a name property of "The Matrix" andprice property of 39.95. Given the JSP page code snippet: 1. 2.
A.Default costs 0.0
B.Default costs 49.95
C.Default costs 39.95
D.The Matrix costs 0.0
E.The Matrix costs 49.95
Click the Exhibit button.
Assume the product attribute does NOT yet exist in any scope.
Which two create an instance of com.example.Product and initialize the name and price properties to the name and price request parameters?()
A.
B.
C.
D.
A.
B.
C.
D.
Given this fragment from a Java EE deployment descriptor:
341.<error-page>
342.<exception-type>java.lang.Throwable</exception-type>
343.<location>/mainError.jsp</location>
344.</error-page>
345.<error-page>
346.<exception-type>java.lang.ClassCastException</exception-type>
347.<location>/castError.jsp</location>
348.</error-page>
If the web application associated with the fragment above throws a ClassCastException.Which statement is true?()
A.The deployment descriptor is invalid.
B.The container invokes mainError.jsp.
C.The container invokes castError.jsp.
D.Neither mainError.jsp nor castError.jsp is invoked.
最新試題
Given a web application in which the request parameter productID contains a product identifier.Which twoEL expressions evaluate the value of the productID?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Click the ’Select and Place’ button.Place the events in the order they occur.
Click the 'Select and Place' button.Place the events in the order they occur.
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? ()
Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()
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?()
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?()