单项选择题
You have built your own light-weight templating mechanism. Your servlets, which handle each request,dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout ofthe view by inserting the header, body, and footer elements into specific locations within the template page.The URLs for these three elements are stored in request scoped variables called, headerURL, bodyURL,and footerURL, respectively. These attribute names are never used for other purposes.
Which JSP codesnippet should be used in the template JSP to insert the JSP content for the body of the page?()
A.<jsp:insert page=’${bodyURL}’ />
B.<jsp:insert file=’${bodyURL}’ />
C.<jsp:include page=’${bodyURL}’ />
D.<jsp:include file=’${bodyURL}’ />
E.<jsp:insert page=’<%= bodyURL %>’ />
相关考题
-
多项选择题
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" /> -
单项选择题
Click the Exhibit button. 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. 3. 4. costs What is the response output of this JSPpage code snippet?()
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.
