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’ %>
您可能感興趣的試卷
你可能感興趣的試題
A.Config
B.Request
C.Session
D.Application
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?()
A.Java code
B.Template text
C.Scripting code
D.Standard action
E.Expression language
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?()
A.<%@ page contentType=’application/javascript’ %>
B.<jsp:page contentType='application/javascript' />
C.<jsp:document contentType='application/javascript' />
D.
E.No declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the <script> tag.
最新試題
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.
Given a Filter class definition with this method:21.public void doFilter(ServletRequest request,22.ServletResponse response,23.FilterChain chain)24.throws ServletException, IOException {25.// insert code here26.}Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()
Which ensures that a JSP response is of type "text/plain"?()
A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.Which two properly set the title in this scenario?()
Which is a benefit of precompiling a JSP page?()
All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()
Click the ’Select and Place’ button.Place the events in the order they occur.
In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()