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?()
第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>
第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
由第一段“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?()
第5题:
A JSP page needs to perform some operations before servicing the first request. Where can this be done?()
第6题:
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?()
第8题:
A through ;
B of ;
C about
第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?()
第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?()