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?()
- A、<%= product.getName()%>
- 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()%>
正确答案:B,D
答案解析:有
微信扫一扫手机做题