單項(xiàng)選擇題 Click the Exhibit button.
Given the HTML form: 1. 2. 3. 4.Name:  5.Price:  6. 7. 8. 9. Assume the product attribute does NOT yet exist in any scope. Which code snippet, in submit.jsp,instantiates an instance of com.example.Product that contains the results of the form submission?()

A.
B.
C.
D.


您可能感興趣的試卷

你可能感興趣的試題

2.單項(xiàng)選擇題

Your web application views all have the same header, which includes the <title> tag in the <head> elementof the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put itinto a single JSP called /WEB-INF/jsp/header.jsp. However, the title of each page is unique, so you havedecided to use a variable called pageTitle to parameterize this in the header JSP, like this:
10.<title>${param.pageTitle}<title>
Which JSP code snippet should you use in your main view JSPs to insert the header and pass thepageTitle variable?()

A.<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:insert>
B.<jsp:include page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>
C.<jsp:include file=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>
D.<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:insert>
E.<jsp:include page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:include>

4.單項(xiàng)選擇題

Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated by the servlet to the JSP;furthermore, that JSP uses a custom tag and must also process this information. This information mustNOT be accessible to any other servlet, JSP or session in the webapp.
How can you accomplish this goal?()

A.Store the data in a public instance variable in the servlet.
B.Add an attribute to the request object before using the request dispatcher.
C.Add an attribute to the context object before using the request dispatcher.
D.This CANNOT be done as the tag handler has no means to extract this data.

最新試題

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

題型:?jiǎn)柎痤}

Which two are valid and equivalent?()

題型:多項(xiàng)選擇題

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

題型:?jiǎn)柎痤}

In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()

題型:多項(xiàng)選擇題

A web browser need NOT always perform a complete request for a particular page that it suspects mightNOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partialresponse from the web server; this response includes information, such as the Last-Modified date but NOTthe body of the page.Which HTTP method will the browser use to retrieve such a partial response?()

題型:?jiǎn)雾?xiàng)選擇題

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

題型:?jiǎn)柎痤}

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

題型:?jiǎn)柎痤}

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

題型:?jiǎn)柎痤}

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

題型:?jiǎn)柎痤}

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? ()

題型:多項(xiàng)選擇題