单项选择题

A.4container.Whilereviewingtheapplication,adeveloperrealizesthatinmultipleplaceswithinthecurrentapplication,nearlyduplicatecodeexiststhatfindsenterprisebeans.Whichpatternshouldbeusedtoeliminatethisduplicatecode?()
A.TransferObject
B.FrontController
C.ServiceLocator
D.InterceptingFilter
E.BusinessDelegate
F.Model-View-Controller
相关考题

单项选择题 Given:1.<%int[]nums={42,420,4200};2.request.setAttribute("foo",nums);%>3.${5+3lt6}4.${requestScope[’foo’][0]ne10div0}5.${10div0}Whatistheresult?()

单项选择题 WhichHTTPmethodrepresentsarequestforinformationaboutthesupportedmethodsonanHTTPserver?()

单项选择题 GivenanHttpServletRequestrequestandHttpServletResponseresponse,whichsetsacookie“username”withthevalue“joe”inaservlet.?()

单项选择题 GiventhisfragmentfromaJavaEEdeploymentdescriptor:124.<welcome-file>beta.html</welcome-file>125.<welcome-file>alpha.html</welcome-file>Andthisrequestfromabrowser:http://www.sun.com/SCWCDtestApp/registerWhichstatementiscorrect,whenthecontainerreceivesthisrequest?()A.ThisdeploymentdescriptorisNOTvalid.B.Thecontainerfirstlooksintheregisterdirectoryforbeta.html.C.Thecontainerfirstlooksintheregisterdirectoryforalpha.html.D.Thecontainerfirstlooksforaservletmappinginthedeploymentdescriptor.

单项选择题 Youarebuildingadatingwebsite.Theclient’sdateofbirthiscollectedalongwithlotsofotherinformation.YouhavecreatedanELfunctionwiththesignature:calcAge(java.util.Date):intanditisassignedtothename,age,inthenamespace,funct.InoneofyourJSPsyouneedtoprintaspecialmessagetoclientswhoareyoungerthan25.WhichELcodesnippetwillreturntrueforthiscondition?()A.${calcAge(client.birthDate)<25}B.${calcAge[client.birthDate]<25}C.${funct:age(client.birthDate)<25}D.${funct:age[client.birthDate]<25}E.${funct:calcAge(client.birthDate)<25}

单项选择题 WhichstatementistrueifthedoStartTagmethodreturnsEVAL_BODY_BUFFERED?()

单项选择题 WhichbasicauthenticationtypeisoptionalforaJ2EE1.4compliantwebcontainer?()

单项选择题 GivenaFilterclassdefinitionwiththismethod:21.publicvoiddoFilter(ServletRequestrequest,22.ServletResponseresponse,23.FilterChainchain)24.throwsServletException,IOException{25.//insertcodehere26.}Whichshouldyouinsertatline25toproperlyinvokethenextfilterinthechain,orthetargetservletiftherearenomorefilters?()A.chain.forward(request,response);B.chain.doFilter(request,response);C.request.forward(request,response);D.request.doFilter(request,response);

单项选择题 GivenanELfunctionfoo,innamespacefunc,thatrequiresalongasaparameterandreturnsaMap,whichtwoarevalidinvocationsoffunctionfoo?()

单项选择题 Giventhatlogin.getName()returnsajava.lang.StringvalueandgiventheJSPcode:WelcomeWhichisequivalent?()

单项选择题 Whichwilldeclareamethodthatisavailabletoallmembersofthesamepackageandbereferencedwithoutaninstanceoftheclass?()

单项选择题 GivenanHttpServletRequestrequest,whichretrievesanobjectoftypeAccountwithanIdof“account”?()

单项选择题 Given1.publicclassFoo{2.publicstaticvoidmain(String[]args)}3.try{return;}4.finally{Syste.out.printIn(Finally”);}5.}6.}Whatistheresult()?

单项选择题 Whatisthenumericalrangeofchar?()

单项选择题 Whichmechanismrequirestheclienttoprovideitspublickeycertificate?()

单项选择题 WhichretrievesallcookiessentinagivenHttpSErvletRequestrequest?()

单项选择题 WhichHTTPmethodhasthecharacteristicthatmultipleindentialrequestsmayproducesideeffectbeyondthoseofasinglerequest()?

单项选择题 Everypageofyourwebsitemustincludeacommonsetofnavigationmenusatthetopofthepage.ThismenuisstaticHTMLandchangesfrequently,soyouhavedecidedtouseJSP’sstaticimportmechanism.WhichJSPcodesnippetaccomplishesthisgoal?()A.<%@importfile=’/common/menu.html’%>B.<%@pageimport=’/common/menu.html’%>C.<%@importpage=’/common/menu.html’%>D.<%@includefile=’/common/menu.html’%>E.<%@pageinclude=’/common/menu.html’%>

单项选择题 Adeveloperisdesigningthepresentationtierforawebapplicationwhichrequiresacentralizedrequesthandlingtocompletecommonprocessingrequiredbyeachrequest.Whichdesignpatternprovidesasolutiontothisproblem?()

单项选择题 YouhaveasimplewebapplicationthathasasingleFrontControllerservletthatdispatchestoJSPstogenerateavarietyofviews.Severaloftheseviewsrequirefurtherdatabaseprocessingtoretrievethe necessaryorderobjectusingtheorderIDrequestparameter.Todothisadditionalprocessing,youpasstherequestfirsttoaservletthatismappedtotheURLpattern/WEBINF/retreiveOrder.dointhedeploymentdescriptor.Thisservlettakestworequestparameters,theorderIDandthejspURL.IthandlesthedatabasecallstoretrieveandbuildthecomplexorderobjectsandthenitdispatchestothejspURL.WhichcodesnippetintheFrontControllerservletdispatchestherequesttotheorderretrievalservlet?()