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 

题目

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
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Formanageabilitypurposes,youhavebeentoldtoadda"count"instancevariabletoacriticalJSP DocumentsothataJMXMBeancantrackhowfrequentthisJSPisbeinginvoked.WhichJSPcodesnippetmustyouusetodeclarethisinstancevariableintheJSPDocument?()

A.<jsp:declaration>intcount=0;<jsp:declaration>

B.<%!intcount=0;%>

C.<jsp:declaration.instance>intcount=0;.<jsp:declaration.instance>

D.<jsp:scriptlet.declaration>intcount=0;.<jsp:scriptlet.declaration>


参考答案:A

第2题:

Do you have any particular conditions that you would like the company to take into consideration?


正确答案:
        

第3题:

B

When something goes wrong,it can be very satisfying to say,”Well,it’s so-and-so’s fault.”or “I know I’m late,but it’s not my fault;the car broke down.”It is probably not your fault,but once you form. the habit of blaming somebody or something else for a bad situation,you are a loser. You have no power and could do nothing that helps change the situation. However,you can have great power over what happens to you if you stop focusing on whom to blame and start focusing on how to remedy the situation. This is the winner’s key to success.

Winners are great at overcoming problems. For example, if you were late because your car broke down, maybe you need to have your car examined more regularly. Or, you might start to carry along with you the useful phone numbers, so you could call for help when in need. For another example, if your colleague causes you problems on the job for lack of responsibility or ability, find ways of dealing with his irresponsibility or inability rather than simply blame the person. Ask to work with a different person, or don’t rely on the person. You should accept that the person. Ask to work with a different person, or don’t rely on this person. You should accept that the person is not reliable and find creative ways to work successfully regardless of how your colleague fails to do his job well.

This is what being a winner is all about—creatively using your skills and talents so that you are successful no matter what happens. Winners don’t have fewer problems in their lives; they have just as many difficult situations to face as anybody else. They are just better at seeing those problems as challenges and opportunities to develop their own talents. So, stop focusing on “whose fault it is.” Once you are confident about your power over bad situations, problems are just stepping stop on for success.

46. According to the passage, winners __________ .

A. deal with problems rather than blame others

B. meet with fewer difficulties in their lives

C. have responsible and able colleagues

D. blame themselves rather that others


正确答案:D

由第一段“However, you can have great power over what happens to you if you stop focusing on whom to blame and start focusing on how to remedy the situation.”可知

第4题:

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?()

  • 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

正确答案:B

第5题:

A JSP page needs to perform some operations before servicing the first request. Where can this be done?()

  • A、 within a method called jspInit
  • B、 within the page directive of the JSP page
  • C、 within a scriptlet at the top of the JSP page
  • D、 within the  XML element

正确答案:A

第6题:

Don’t you have to first have enough food and clothing before you ____ after your dreams?

A.ignore

B.chase

C.renew

D.suppose


答案:B

解析:chase after 意为追逐;原题题意为难道你不需要先有足够的食物和衣服,然后才去追逐你的梦想吗;ignore为忽视;renew为更新,suppose为推断均不符合句意,故选B

第7题:

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:declaration>int count = 0;<jsp:declaration>
  • B、<%! int count = 0; %>
  • C、<jsp:declaration.instance>int count = 0;. <jsp:declaration.instance>
  • D、<jsp:scriptlet.declaration>int count = 0;. <jsp:scriptlet.declaration>

正确答案:A

第8题:

But Jerry, have you really thought this ______? You would essentially be giving up the company that your great-grandfather built.

A through ;

B of ;

C about


参考答案:A

第9题:

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"); %>

正确答案:C

第10题:

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’ %>

正确答案:C,E

更多相关问题