多项选择题

A.${priority = ’medium’}
B.${requestScope[’priority’] = ’medium’}
C.<c:set var="priority" value="medium" />
D.<c:set var="priority" scope="request">medium</c:set>
E.<c:set var="priority" value="medium" scope="request" />

相关考题

单项选择题 WhichJSTLcodesnippetcanbeusedtoperformURLrewriting?()

单项选择题 Assume that a news tag library contains the tags lookup and item: lookup Retrieves the latest news headlines and executes the tag body once for each headline. Exposes a NESTED page scoped attributecalled headline of type com.example.Headline containing details for that headline. item Outputs the HTMLfor a single news headline. Accepts an attribute info of typecom.example.Headline containing details for theheadline to be rendered. Which snippet of JSP code returns the latest news headlines in an HTML table,one per row?()

单项选择题 One of the use cases in your web application uses many session-scoped attributes. At the end of the usecase, you want to clear out this set of attributes from the session object. Assume that this static variableholds this set of attribute names: 201.private static final Set<String> USE_CASE_ATTRS;  202.static { 203.USE_CASE_ATTRS.add("customerOID"); 204.USE_CASE_ATTRS.add("custMgrBean"); 205.USE_CASE_ATTRS.add("orderOID"); 206.USE_CASE_ATTRS.add("orderMgrBean"); 207.} Which code snippet deletes these attributes from the session object?()

单项选择题 Whichstatementistrueaboutwebcontainersessionmanagement?()

单项选择题 Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted. Which listener class will accomplish this debugging goal?()

多项选择题 You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session?()

单项选择题 Given the definition of MyServlet: 11.public class MyServlet extends HttpServlet { 12.public void service(HttpServletRequest request, 13.HttpServletResponse response) 14.throws ServletException, IOException { 15.HttpSession session = request.getSession(); 16.session.setAttribute("myAttribute","myAttributeValue"); 17.session.invalidate(); 18.response.getWriter().println("value=" + 19.session.getAttribute("myAttribute")); 20.} 21.} What is the result when a request is sent to MyServlet?()

多项选择题 A developer wants to make a name attribute available to all servlets associated with a particular user,across multiple requests from that user, from the same browser instance. Which two provide this capability from within a tag handler?()

单项选择题 Click the Exhibit button. The resource requested by the RequestDispatcher is available and implemented by the Destination Servlet. What is the result?()

多项选择题 You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()

多项选择题 A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal?()

单项选择题 Your web site has many user-customizable features, for example font and color preferences on web pages.Your IT department has already built a subsystem for user preferences using the Java SE platform’s lang.util.prefs package APIs, and you have been ordered to reuse this subsystem in your web application. Youneed to create an event listener that constructs the preferences factory and stores it in the applicationscope for later use. Furthermore, this factory requires that the URL to a database must be declared in thedeployment descriptor like this: 42. 43.prefsDbURL 44. 45.jdbc:pointbase:server://dbhost:4747/prefsDB 46. 47. Which partial listener class will accomplish this goal?()

单项选择题 Servlet A receives a request that it forwards to servlet B within another web application in the same webcontainer. Servlet A needs to share data with servlet B and that data must not be visible to other servlets inA’s web application. In which object can the data that A shares with B be stored?()

单项选择题 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?()