多选题You are writing a JSP that includes scriptlet code to declare a List variable and initializes that variable to anArrayList object. Which two JSP code snippets can you use to import these list types?()A%! import java.util.*; %B%! import java.util.List;import java.util.ArrayList; %C%@ page import=’java.util.List’import=’java.util.ArrayList’ %D%@ import types=’java.util.List’types=’java.util.ArrayList’ %E%@ page import=’java.util.List,java.util.ArrayList’ %F%@ import types=’java.util.List,java.util.ArrayList’ %

多选题
You are writing a JSP that includes scriptlet code to declare a List variable and initializes that variable to anArrayList object. Which two JSP code snippets can you use to import these list types?()
A

<%! import java.util.*; %>

B

<%! import java.util.List;import java.util.ArrayList; %>

C

<%@ page import=’java.util.List’import=’java.util.ArrayList’ %>

D

<%@ import types=’java.util.List’types=’java.util.ArrayList’ %>

E

<%@ page import=’java.util.List,java.util.ArrayList’ %>

F

<%@ import types=’java.util.List,java.util.ArrayList’ %>


参考解析

解析: 暂无解析

相关考题:

You are writing a method that accepts a string parameter named message.Your method must break the message parameter into individual lines of text and pass each line to a second method named Process.Which code segment should you use?()A.B.C.D.

You are writing an application that uses SOAP to exchange data with other applications.You use a Department class that inherits from ArrayList to send objects to another application.The Department object is named dept.You need to ensure that the application serializes the Department object for transport by using SOAP.Which code should you use?()A.B.C.D.

You are writing a method to compress an array of bytes.The array is passed to the method in a parameter named document.You need to compress the incoming array of bytes and return the result as an array of bytes.Which code segment should you use?()A.B.C.D.

Formanageabilitypurposes,youhavebeentoldtoaddacountinstancevariabletoacriticalJSP DocumentsothataJMXMBeancantrackhowfrequentthisJSPisbeinginvoked.WhichJSPcodesnippetmustyouusetodeclarethisinstancevariableintheJSPDocument?()A.jsp:declarationintcount=0;jsp:declarationB.%!intcount=0;%C.jsp:declaration.instanceintcount=0;.jsp:declaration.instanceD.jsp:scriptlet.declarationintcount=0;.jsp:scriptlet.declaration

One of the guidelines in writing the C code is as follows: write code that is as clear as(15).A.readableB.reusableC.possibleD.semantic

For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippetmust you use to declare this instance variable in the JSP Document?()A、jsp:declarationint count = 0;jsp:declarationB、%! int count = 0; %C、jsp:declaration.instanceint count = 0;. jsp:declaration.instanceD、jsp:scriptlet.declarationint count = 0;. jsp:scriptlet.declaration

A JSP page needs to perform some operations before servicing the first request. Where can this be done?()A、 within a method called jspInitB、 within the page directive of the JSP pageC、 within a scriptlet at the top of the JSP pageD、 within the  XML element

You are writing a JSP that includes scriptlet code to declare a List variable and initializes that variable to anArrayList object. Which two JSP code snippets can you use to import these list types?()A、%! import java.util.*; %B、%! import java.util.List;import java.util.ArrayList; %C、%@ page import=’java.util.List’import=’java.util.ArrayList’ %D、%@ import types=’java.util.List’types=’java.util.ArrayList’ %E、%@ page import=’java.util.List,java.util.ArrayList’ %F、%@ import types=’java.util.List,java.util.ArrayList’ %

You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()A、In the init method.B、In the jspInit method.C、In the constructor of the JSP’s Java code.D、In a JSP declaration, which includes an initializer block.E、In a JSP declaration, which includes a static initializer block.

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?()A、%@ page isThreadSafe=’false’ %B、%@ implements SingleThreadModel %C、%! implements SingleThreadModel %D、%@ page useSingleThreadModel=’true’ %E、%@ page implements=’SingleThreadModel’ %

下列关于JSP的scriptlet的陈述正确的是()。A、Scriptlet是包含在%和%%和%之间的B、Scriptlet可以包含import语句C、Scriptlet不但包含Java代码,还可以包含html代码D、整个JSP可以有多个%t和%%T和%%和%对

You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the  tag that requires the page name tobe specified dynamically when the header is imported. Which JSP code snippet performs the import of theheader content?() titleA、jsp:include page=’/WEB-INF/jsp/header.jsp’jsp:param name=’pageName’ value=’Welcome Page’ / /jsp:includeB、jsp:import page=’/WEB-INF/jsp/header.jsp’jsp:param name=’pageName’ value=’Welcome Page’ / /jsp:importC、jsp:include page=’/WEB-INF/jsp/header.jsp’jsp:attribute name=’pageName’ value=’Welcome Page’ / . /jsp:includeD、jsp:import page=’/WEB-INF/jsp/header.jsp’. jsp:attribute name=’pageName’ value=’Welcome Page’ / . /jsp:import

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 TLDB、 Scriptlet code is NOT legal in the body of st:simpleC、 Add scripting-enabled= “true” to the start tag for the st:simple elementD、 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.

You are building a Front Controller using a JSP page and you need to determine if the user’s session hasNOT been created yet and perform some special processing for this case. Which scriptlet code snippet willperform this test?()A、% if ( request.getSession(false) == null ) {// special processing} %B、% if ( request.getHttpSession(false) == null ) {// special processing} %C、% if ( requestObject.getSession(false) == null ) { // special processing} %D、% if ( requestObject.getHttpSession(false) == null ) { // special processing} %

You are testing an existing ASP.NET page. The page includes a text box. You are able to execute malicious JavaScript code by typing it in the text box and submitting. You need to configure the page to prevent JavaScript code from being submitted by the text box. In the @ Page directive, which attribute should you set to true?()A、the EnableEventValidation attributeB、the ResponseEncoding attributeC、the ValidateRequest attributeD、the Strict attribute

You are developing an ASP.NET Web page. The page includes a List instance. You add a FormView control to display a single Product from this list. You need to bind the list to the FormView control. Which FormView property should you set in the code-behind file?()A、DataSourceB、DataSourceIDC、DataKeyNamesD、DataMember

单选题You work as an application developer at Certkiller .com. You have recently created an application that includes the code shown below. public delegate stringGetFileContentsDel (); public string GetFileContents () {  //Process file and return results }  You now need to invoke the GetFileContents method asynchronously.  You have to ensure that the code you use to invoke the GetFileContents method will continue to process other user instructions, and displays the results as soon as the GetFileContents method finishes processing.What should you do?()A AB BC CD D

单选题Assume the tag handler for a st:simple tag extends Simple Tag Support. In what way can scriptlet code beused in the body of st:simple?()ASet the body content type to JSP in the TLDBScriptlet code is NOT legal in the body of st:simple.CAdd scripting-enabled=true to the start tag for the st:simple elementDAdd 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

单选题For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippetmust you use to declare this instance variable in the JSP Document?()Ajsp:declarationint count = 0;jsp:declarationB%! int count = 0; %Cjsp:declaration.instanceint count = 0;. jsp:declaration.instanceDjsp:scriptlet.declarationint count = 0;. jsp:scriptlet.declaration

单选题A JSP page needs to perform some operations before servicing the first request. Where can this be done?()A within a method called jspInitB within the page directive of the JSP pageC within a scriptlet at the top of the JSP pageD within the  XML element

单选题You are implementing an ASP.NET application. The application includes a Person class with property Age. You add a page in which you get a list of Person objects and display the objects in a GridView control. You need to add code so that the GridView row is highlighted in red if the age of the person is less than 18. Which GridView event should you handle?()ARowDataBoundBRowCommandCRowUpdatedDRowEditing

单选题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?()A%@ page isThreadSafe=’false’ %B%@ implements SingleThreadModel %C%! implements SingleThreadModel %D%@ page useSingleThreadModel=’true’ %E%@ page implements=’SingleThreadModel’ %

单选题In a JSP-centric web application, you need to create a catalog browsing JSP page. The catalog is stored asa List object in the catalog attribute of the webapp’s ServletContext object.  Which scriptlet code snippetgives you access to the catalog object?()A% List catalog = config.getAttribute(catalog); %B% List catalog = context.getAttribute(catalog); %C% List catalog = application.getAttribute(catalog); %D% List catalog = servletContext.getAttribute(catalog); %

多选题You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()AIn the init method.BIn the jspInit method.CIn the constructor of the JSP’s Java code.DIn a JSP declaration, which includes an initializer block.EIn a JSP declaration, which includes a static initializer block.

单选题You are testing an existing ASP.NET page. The page includes a text box. You are able to execute malicious JavaScript code by typing it in the text box and submitting. You need to configure the page to prevent JavaScript code from being submitted by the text box. In the @ Page directive, which attribute should you set to true?()Athe EnableEventValidation attributeBthe ResponseEncoding attributeCthe ValidateRequest attributeDthe Strict attribute

单选题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 TLDB Scriptlet code is NOT legal in the body of st:simpleC Add scripting-enabled= “true” to the start tag for the st:simple elementD 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.

单选题Your web application views all have the same header, which includes the  tag in the  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.${param.pageTitle} Which JSP code snippet should you use in your main view JSPs to insert the header and pass thepageTitle variable?()Ajsp:insert page=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:insertBjsp:include page=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:includeCjsp:include file=’/WEB-INF/jsp/header.jsp’. ${pageTitle=’Welcome Page’}. /jsp:includeDjsp:insert page=’/WEB-INF/jsp/header.jsp’. jsp:param name=’pageTitle’ value=’Welcome Page’ / . /jsp:insertEjsp:include page=’/WEB-INF/jsp/header.jsp’. jsp:param name=’pageTitle’ value=’Welcome Page’ / . /jsp:include