多项选择题


Which two produce the output "one, two and three"?()

A. ${param.num[0].[1] and [2]}
B. ${param.values[0].[1] and [2]}
C. ${param.num[0]}, ${param.num[1]} and ${param.num [2]}
D. ${param.values[0]}, ${param.values[1]} and ${param.values [2]}
E. ${param.values["num"][0]}, ${param.values["num"][1]} and ${param.values["num"][2]}
F. ${param.values.num[0]}, ${param.values.num[1]} and ${param.values.num[2]}


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题Which the JSTL code snippet can be used to import content from another web resource?()

A. <c:import url=*foo.jsp”/> 
B. <c:import page=*foo.jsp”/> 
C. <c:include url=*foo.jsp”/> 
D. <c:include page=*foo.jsp”/> 
E. Importing cannot be done in JSTL. A standard action must be used instead.

2.多项选择题

A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed. 
Which two are true? ()

A. A  element in the echo tag LTD must have the value JSP
B. The echo tag handler must define the setAttribute (String key, String value) method
C. The true element must appear in the echo tag TLD
D. The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface
E. The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface

5.多项选择题Which the two are characteristics of the Service Locator pattern?()

A. It encapsulates component lookup procedures
B. It increases source code duplication and decreases reuse
C. It improves client performance by caching context and factory objects
D. It degrades network performance due to increased access to distributed lookup services

6.单项选择题Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()

A. Set the body content type to JSP in the TLD
B. Scriptlet code is NOT legal in the body of st:simple
C. Add scripting-enabled= “true” to the start tag for the st:simple element
D. Add a pass-through Classic tag with a body content type of JSP to the body of st:simple, and      place the scriptlet code in the body of that tag.

7.单项选择题


The tag handler for n:recurse extends SimpleTagSupport.Assuming an n:recurse tag can either contain an empty body or another n:recurse tag, which strategy allows the tag handler for n:recurse to output the nesting depth of the deepest n:recurse tag?()  

A. It is impossible to determine the deepest nesting depth because it is impossible for tag handlers that extend SimpleTagSupport to communicate with their parent and child tags
B. Create a private non-static attribute in the tag handler class called count of type int initialized to      oIncrement count in the doTag method. If the tag has a body, invoke the fragment for that body. Otherwise, output the value of count
C. Start a counter at 1. Call getChildTags(). If it returns null, output the value of the counter.      Otherwise, increment counter and continue from where getChildTags() is called. Skip      processing of the body.
D. If the tag has a body, invoke the fragment for that body. Otherwise, start a counter at 1. Call      getParent(). If it returns null, output the value of the counter. Otherwise, increment the counter      and continue from where getParent() is called.

8.单项选择题


Which code snippet, inserted at line 8, causes the value Company to be output?()

A. JspWriter w = pageContext.getOut();w.print(“Company”);
B. JspWriter w = pageContext.getWriter();w.print(“Company”);
C. JspWriter w = new JspWriter(pageContext.getOut()); w.print(“Company”);
D. JspWriter w = new JspWriter (pageContext.getResponse()); w.print(“Company”);

9.单项选择题

Which statement, at line 16, retrieves an InputStream for the file /WEBINF/ nyresrc.bin()?

A. new InputStream(“/WEB-INF/nyressrc.bin”);
B. ctx.getInputStream(“/WEB-INF/nyresrc.bin”);
C. ctx.getresourceAsStream(“/WEB-INF/nyresrc.bin”);
D. new InputStream(“/WEB-INF/nyresrc.bin”);
E. getClass().getResourceAsStream(“/WEB-INF/nyresrc.bin”);

10.多项选择题


Which three can be placed at line 23 to retrieve an existing HttpSession object?()

A. HttpSession session = request.getSession();
B. HttpSession session = request.getSession(id);
C. HttpSession session = request.getSession(true);
D. HttpSession session = request.getSession(false);
E. HttpSession session = request.getSession(“jsessionid”)

最新试题

What else must the developer do to ensure that the intended security goal is achieved()?  

题型:单项选择题

A developer is designing a web application which extensively uses EJBs and JMS. The developer finds that there is a lot of duplicated code to build the JNDI contexts to access the beans and queues. Further, because of the complexity, there are numerous errors in the code. Which J2EE design pattern provides a solution for this problem?()

题型:单项选择题

Given a web application in which the request parameter product ID contains a product identifier.Which two EL expressions evaluate the value of the product ID?()

题型:多项选择题

Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two changes, taken together, ensure that value is equal to “Hello” on line 23? ()

题型:多项选择题

Which the three are true about servlet filters?()

题型:多项选择题

Which the three EL expressions, inserted at line 15, are valid and evaluate to "3"? ()

题型:多项选择题

Which two are true?()

题型:多项选择题

A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.Company.  Product class with a name property of “The Matrix” and price property of 39.95. Given the JSP page code snippet:What is the response output of this JSP page code snippet? ()

题型:单项选择题

Which the two are characteristics of the Service Locator pattern?()

题型:多项选择题

When using Form Based Authentication, which pair of fields must be used in the login form?()  

题型:单项选择题