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 portion of a valid Java EE web application’s directory structure: MyApp |
|-- File1.html
|
|-- Directory1
||-- File2.html|
|-- META-INF
|-- File3.html
You want to know whether File1.html, File2.html, and/or File3.html will be directly accessible by your webclient’s browsers.
Which statement is true?()
A.All three files are directly accessible.
B.Only File1.html is directly accessible.
C.Only File2.html is directly accessible.
D.Only File3.html is directly accessible.
E.Only File1.html and File2.html are directly accessible.
最新試題
Click the 'Select and Place' button.Place the events in the order they occur.
Which ensures that a JSP response is of type "text/plain"?()
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?()
Click the 'Select and Place' button.Place the events in the order they occur.
Which is true about the web container request processing model?()
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?()
Which three are true about servlet filters?()
Which is a benefit of precompiling a JSP page?()
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.