问题:单选题A web application uses the HttpSession mechanism to determine if a user is “logged in”. When a user supplies a valid user name and password, an HttpSession is created for that user. The user has access to the application for only 15 minutes after logging in. The code must determine how long the user has been logged in, and if this time is greater than 15 minutes, must destroy the HttpSession. Which method in HttpSession is used to accomplish this?()AgetCreationTimeBinvalidateAfterCgetLastAccessedTimeDgetMaxInactiveInterval
Tuesday, September 5, 2023
问题:单选题1. class A { 2. public byte file Number ( ) { 3. return l; 4. } 5. } 6. 7. Class B extends A { 8. public short getNumber( ) { 9. return 2; 10. } 11. 12. public short getNumber( ) { 13. B b = new B( ); 14. System.out.printIn(b.getNumber( )); 15. } 16. } What is the result()?ACompilation succeeds and l is printed.BCompilation succeeds and 2 printed.CAn error at line 8 cause compilation to fail.DAn error at line 14 cause complication to fail.EComplication succeeds but an exception is thrown at line 14.
Saturday, May 4, 2024
问题:多选题Which the two are characteristics of the Service Locator pattern?()AIt encapsulates component lookup proceduresBIt increases source code duplication and decreases reuseCIt improves client performance by caching context and factory objectsDIt degrades network performance due to increased access to distributed lookup services
Wednesday, February 21, 2024
问题:单选题Which the statement is true?()AThe Error class is a Runtime Exception.BNo exceptions are subclasses of Error.CAny statement that may throw an Error must be enclosed in a try block.Dany statement that may throw an Exception must be enclosed in a try block.EAny statement that may throw an Runtime Exception must be enclosed in a try block.
Thursday, October 20, 2022
问题:单选题When adding a element to a web application deployment descriptor, the inclusion of which sub-element requires the definition of an error page()?A<realm-name> B<auth-metod> C<auth-constraint> D<form-login-config> E<user-data-constaint>
Sunday, April 7, 2024
问题:单选题Which the HTTP method represents a request for information about the supported methods on an HTTP server?()AGETBINFOCHEADDTRACEEOPTIONS
Wednesday, October 4, 2023
问题:单选题Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()ApageContext.getAttribute(“foo”);BgetPageContext().getAttribute(“foo”);CpageContext.getApplicationScope(“foo”);DpageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);EgetPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);
Monday, January 2, 2023
问题:多选题A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()AidBtypeCnameDclassEscopeFcreate
Monday, April 8, 2024
问题:单选题A developer is designing a multi-tier web application and discovers a need to log each incoming client request. Which two patterns, taken independently, provide a solution for this problem? ()ATransfer ObjectBService LocatorCFront ControllerDIntercepting FilterEBusiness DelegateFModel-View-Controller
问题:单选题Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map, which two are valid invocations of function foo?()A${func(1)}B${foo:func(4)}C${func:foo(2)}D${foo(5):func}E${func:foo(“easy”)}F${func:foo(“3”).name}
问题:单选题Squeaky Beans Inc. hired an outside consultant to develop their web application. To finish the job quickly, the consultant created several dozen JSP pages that directly communicate with the database. The Squeaky business team has since purchased a set of business objects to model their system, and the Squeaky developer charged with maintaining the web application must now refactor all the JSPs to work with the new system. Which pattern can the developer use to solve this problem?()ATransfer ObjectBService LocatorCIntercepting FilterDBusiness Delegate
问题:多选题Which the two are true about the JSTL core iteration custom tags?()AIt may iterate over arrays, collections, maps and strings.BThe body of the tag may contain EL code, but not scripting code.CWhen looping over collections, a loop status object may be used in the tag body.DIt may iterate over a map, but only the key of the mapping may be used in the tag body.EWhen looping over integers (for example begin1=’1’ end=’10’), a loop status object may not be used in the tag body.
Saturday, September 16, 2023
Friday, November 18, 2022
问题:多选题Which four types of object can be thrown using the throw statement?()AErrorBEventCObjectDExceptionEThrowableFRuntime Exception
Wednesday, March 8, 2023
问题:多选题Given: 1. public class Method Over { 2. public void set Var (int a, int b, float c) { 3. } 4. } Which two overload the set Var method()?Aprivate void set Var(int a, float c, int b) {}Bprotected void set Var(int a, int b, float c) {}Cpublic int set Var(int a, float c, int b) {return a:}Dpublic int set Var(int a, int b, float c) {return a:}Eprotected float set Var(int a, int b, float c) {return c:}
Saturday, January 20, 2024
问题:多选题Which three are valid values for the body-content attribute of a tag directive in a tag file? ()AELBJSPCemptyDdynamicEscriptlessFtagdependent
问题:单选题What is the result?()AThe program runs and prints nothing.BThe program runs and prints “Equal”.CAn error at line 5 cause compilation to fail.DThe program runs but aborts with an exception.
Sunday, December 3, 2023
问题:单选题Which retrieves the binary input stream on line 13?()Arequest.get Writer ():Brequest.get Reader ():Crequest.get Input Stream():Drequest.get Resource As Stream():Erequest.get Resource As Stream (Servlet Request. REQUEST):
问题:多选题Which two are characteristics of the Intercepting Filter pattern?()Ait provides centralized request handling for incoming requests.BIt forces resource authentication to be distributed across web components.CIt reduces coupling between presentation-tier clients and underlying business services.DIt can be added and removed unobtrusively, without requiring changes to existing code.EIt allows preprocessing and postprocessing on the incoming requests and outgoing responses.
Wednesday, February 8, 2023