单项选择题
A.HttpSession
B.ServletConfig
C.ServletContext
D.HttpServletRequest
E.HttpServletResponse
单项选择题 The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows: 11.<sl:shoppingList> 12.<sl:item name="Bread" /> 13.<sl:item name="Milk" /> 14.<sl:item name="Eggs" /> 15.</sl:shoppingList> The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.Which is true?()
单项选择题 Given the JSP code: <% request.setAttribute("foo", "bar"); %>and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()
单项选择题 You are building a web application that will be used throughout the European Union; therefore, it has significant internationalization requirements. You have been tasked to create a custom tag that generates amessage using the java.text.MessageFormat class. The tag will take the resourceKey attribute and a variable number of argument attributes with the format, arg. Here is an example use of this tag and itsoutput: generates: The disk "MyDisk"contains 1247 file(s). Which Simple tag class definition accomplishes this goal of handling a variable number of tag attributes?()
单项选择题 Click the Exhibit button. The attribute "name" has a value of "Foo," What is the result if this tag handler’s tag is invoked?()
单项选择题 You have created a JSP that includes instance variables and a great deal of scriptlet code. Unfortunately,after extensive load testing, you have discovered several race conditions in your JSP scriptlet code. To fixthese problems would require significant recoding, but you are already behind schedule. Which JSP codesnippet can you use to resolve these concurrency problems?()
单项选择题 WhichimplicitobjectisusedinaJSPpagetoretrievevaluesassociatedwithentriesinthedeploymentdescriptor?()
单项选择题 You have built a collection of custom tags for your web application. The TLD file is located in the file: /WEB-INF/myTags.xml. You refer to these tags in your JSPs using the symbolic name: myTags. Which deployment descriptor element must you use to make this link between the symbolic name and the TLD filename?()
多项选择题 Given the JSP code: 10.<html> 11.<body> 12.<jsp:useBean id=’customer’ class=’com.example.Customer’ /> 13.Hello, ${customer.title} ${customer.lastName}, welcome 14.to Squeaky Beans, Inc. 15.</body>16. </html> Which three types of JSP code are used?()
单项选择题 To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in severalweb forms to create screen-specific validation functions and are included in these pages with the followingstatement: 10.<head> 11.<script src=/scripts/screenFunctions.jsp 12.language=javascript 13.type=application/javascript> </script> 14.</head> 15.<!-- body of the web form --> Which JSP code snippet declares that this JSP Document is a JavaScript file?()