單項選擇題

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 %>’ />


您可能感興趣的試卷

你可能感興趣的試題

1.多項選擇題

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" />

最新試題

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.

題型:問答題

Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface:public interface ApplicationController {public String invoke(HttpServletRequest request)}The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext.Which code snippet of the FrontController servlet accomplishes this goal?()

題型:單項選擇題

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

題型:問答題

You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies:20.<input type=’radio’ name=’hobbyEnum’ value=’HIKING’>Hiking <br>21.<input type=’radio’ name=’hobbyEnum’ value=’SKIING’>Skiing <br>22.<input type=’radio’ name=’hobbyEnum’ value=’SCUBA’>SCUBA Diving23.<!-- and more options -->After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname.Which EL code snippet will display Nth element of the user’s selected hobbies?()

題型:單項選擇題

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.

題型:問答題

Which element of a web application deployment descriptor  element is required?()

題型:單項選擇題

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

題型:問答題

Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()

題型:單項選擇題