多选题Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()AAll URLs returned by the server are rewritten.BAn HttpSession object is created if necessary.CThe

题目
多选题
Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()
A

All URLs returned by the server are rewritten.

B

An HttpSession object is created if necessary.

C

The user name and password of the user are checked.

D

The session ID is stored in the HTTP response as a cookie.


相似考题
更多“多选题Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()AAll URLs returned by the server are rewritten.BAn HttpSession object is created if necessary.CThe”相关问题
  • 第1题:

    Given an HttpServletRequest request: 22.String id = request.getParameter("jsessionid"); 23.// insert code here 24.String name = (String) session.getAttribute("name"); Which three can be placed at line 23 to retrieve anexisting HttpSession object?()

    • A、HttpSession session = request.getSession();
    • B、HttpSession session = request.getSession(id);
    • C、HttpSession session = request.getSession(true);
    • D、HttpSession session = request.getSession(false);
    • E、HttpSession session = request.getSession("jsessionid");

    正确答案:A,C,D

  • 第2题:

    Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()

    • A、 All URLs returned by the server are rewritten.
    • B、 An HttpSession object is created if necessary.
    • C、 The user name and password of the user are checked.
    • D、 The session ID is stored in the HTTP response as a cookie.

    正确答案:B,D

  • 第3题:

    Which of the following statements about variables and scope are true?() 

    • A、 Local variables defined inside a method are destroyed when the method is exited.
    • B、 Local variables are also called automatic variables.
    • C、 Variables defined outside a method are created when the object is constructed.
    • D、 A method parameter variable continues to exist for as long as the object is needed in which the method is defined.

    正确答案:A,B,C

  • 第4题:

    A web application uses the HttpSession mechanism to determine if a user is "logged in." When a usersupplies a valid user name and password, an HttpSession is created for that user. The user has access tothe application for only 15 minutes after logging in. The code must determine how long the user has beenlogged in, and if this time is greater than 15 minutes, must destroy the HttpSession. Which method in HttpSession is used to accomplish this?()

    • A、Getcreationtime
    • B、Invalidateafter
    • C、Getlastaccessedtime
    • D、Getmaxinactiveinterval

    正确答案:A

  • 第5题:

    You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()

    • A、Your filter class must implement an init method and a destroy method.
    • B、Your filter class must also implement javax.servlet.FilterChain.
    • C、When your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.
    • D、The method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.
    • E、Your filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.

    正确答案:A,D

  • 第6题:

    Which statement is true?()

    • A、A class’s finalize() method CANNOT be invoked explicitly.
    • B、super.finalize() is called implicitly by any overriding finalize() method.
    • C、The finalize() method for a given object is called no more than once by the garbage collector.
    • D、The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.

    正确答案:C

  • 第7题:

    单选题
    Two new servers are purchased and need to be installed to allow sharing of a single external hard drive enclosure.  One server is configured as a local file server, and the other as a database server for a different network.  The onsite technician notices that when both servers are running at the same time, they each receive SCSI errors. When they are running individually, no errors are reported.   Which of the following is the BEST source of information to use for troubleshooting this problem?()
    A

     the server vendor’s FAQ website

    B

     the SCSI controller vendor’s user manual

    C

     the drive enclosure vendor’s user manual

    D

     the network operating system vendor’s website


    正确答案: D
    解析: 暂无解析

  • 第8题:

    单选题
    Given that session is a valid HttpSession object:   Int max = session.getAttribute(“MyReallyLongName”);   Which is true?()
    A

     The value returned needs to be cast to an int.

    B

     The getAttribute methos takes two arguments.

    C

     Primitive CANNOT be stored in the HttpSession.

    D

     The HttpSession attribute name must NOT exceed eight characters.


    正确答案: B
    解析: 暂无解析

  • 第9题:

    单选题
    Which is true about the web container request processing model?()
    A

    The init method on a filter is called the first time a servlet mapped to that filter is invoked.

    B

    A filter defined for a servlet must always forward control to the next resource in the filter chain.

    C

    Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file.

    D

    If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it.


    正确答案: C
    解析: 暂无解析

  • 第10题:

    多选题
    Which two classes or interfaces provide a getSession method?()
    A

    javax.servlet.http.HttpServletRequest

    B

    javax.servlet.http.HttpSessionContext

    C

    javax.servlet.http.HttpsServletResponse

    D

    javax.servlet.http.HttpSessionBindingEvent

    E

    javax.servlet.http.HttpSessionAttributeEvent


    正确答案: A,C
    解析: 暂无解析

  • 第11题:

    多选题
    Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()
    A

    All URLs returned by the server are rewritten.

    B

    An HttpSession object is created if necessary.

    C

    The user name and password of the user are checked.

    D

    The session ID is stored in the HTTP response as a cookie.


    正确答案: C,D
    解析: 暂无解析

  • 第12题:

    多选题
    Which two outcomes result when a domain is created in development mode?()
    A

    WebLogic server starts automatically upon the restarting of the machine

    B

    each new cluster will automatically be created with two managed servers

    C

    boot.properties file automatically stored

    D

    creation of an auto deploy folder used for the application to deploy automatically

    E

    Node Manager will be automatically configured


    正确答案: E,A
    解析: 暂无解析

  • 第13题:

    Which is the true choice about the web container request processing model()?

    • A、 The init method on a filter is called the first time a servlet mapped to that filter is invoked
    • B、 A filter defined for a servlet must always forward control to the next resource in the filter chain.
    • C、 Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file
    • D、 If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it

    正确答案:C

  • 第14题:

    Two new servers are purchased and need to be installed to allow sharing of a single external hard drive enclosure.  One server is configured as a local file server, and the other as a database server for a different network.  The onsite technician notices that when both servers are running at the same time, they each receive SCSI errors. When they are running individually, no errors are reported.   Which of the following is the BEST source of information to use for troubleshooting this problem?()

    • A、 the server vendor’s FAQ website
    • B、 the SCSI controller vendor’s user manual
    • C、 the drive enclosure vendor’s user manual
    • D、 the network operating system vendor’s website

    正确答案:C

  • 第15题:

    Which two classes or interfaces provide a getSession method?()

    • A、javax.servlet.http.HttpServletRequest
    • B、javax.servlet.http.HttpSessionContext
    • C、javax.servlet.http.HttpServletResponse
    • D、javax.servlet.http.HttpSessionBindingEvent
    • E、javax.servlet.http.HttpSessionAttributeEvent

    正确答案:A,D

  • 第16题:

    Given that session is a valid HttpSession object:   Int max = session.getAttribute(“MyReallyLongName”);   Which is true?()  

    • A、 The value returned needs to be cast to an int.
    • B、 The getAttribute methos takes two arguments.
    • C、 Primitive CANNOT be stored in the HttpSession.
    • D、 The HttpSession attribute name must NOT exceed eight characters.

    正确答案:C

  • 第17题:

    Which is true about the web container request processing model?()

    • A、The init method on a filter is called the first time a servlet mapped to that filter is invoked.
    • B、A filter defined for a servlet must always forward control to the next resource in the filter chain.
    • C、Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file.
    • D、If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it.

    正确答案:C

  • 第18题:

    Which two outcomes result when a domain is created in development mode?()

    • A、WebLogic server starts automatically upon the restarting of the machine
    • B、each new cluster will automatically be created with two managed servers
    • C、boot.properties file automatically stored  
    • D、creation of an auto deploy folder used for the application to deploy automatically
    • E、Node Manager will be automatically configured

    正确答案:C,D

  • 第19题:

    多选题
    You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()
    A

    Your filter class must implement an init method and a destroy method.

    B

    Your filter class must also implement javax.servlet.FilterChain.

    C

    When your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.

    D

    The method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.

    E

    Your filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.


    正确答案: A,B
    解析: 暂无解析

  • 第20题:

    多选题
    Which two are true?()
    A

    A finalizer may NOT be invoked explicitly.

    B

    The finalize method declared in class Object takes no action.

    C

    super.finalize()is called implicitly by any over riding finalize method.

    D

    The finalize method for a given objec twill be called no more than once by the garbage collector.

    E

    The order in which finalize will be called on two objects is based on the order in which the two objects became finalizable.


    正确答案: B,C
    解析: 暂无解析

  • 第21题:

    单选题
    Which statement is true?()
    A

    A class’s finalize() method CANNOT be invoked explicitly.

    B

    super.finalize() is called implicitly by any overriding finalize() method.

    C

    The finalize() method for a given object is called no more than once by the garbage collector.

    D

    The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.


    正确答案: C
    解析: 暂无解析

  • 第22题:

    多选题
    Which two prevent a servlet from handling requests.?()
    A

    The servlet’s init method returns a non-zero status.

    B

    The servlet’s init method throws a Servlet Exception

    C

    The servlet’s init method sets the Servlet Response’s context length to 0

    D

    The servlet’s init method sets the Servlet Response’s content type to null.

    E

    The servlet’s init method does NOT return within a time period defined by the servlet container.


    正确答案: E,C
    解析: 暂无解析

  • 第23题:

    多选题
    Which of the following resources are created in the WebSphere Application Server configuration when a WebSphere Commerce V5.6 instance is created?()
    A

    DataSource

    B

    Virtual Hosts

    C

    Server Group

    D

    The selected JDBC Driver

    E

    Remote Servlet Redirector


    正确答案: C,B
    解析: 暂无解析

  • 第24题:

    多选题
    Which of the following statements about variables and scope are true?()
    A

    Local variables defined inside a method are destroyed when the method is exited.

    B

    Local variables are also called automatic variables.

    C

    Variables defined outside a method are created when the object is constructed.

    D

    A method parameter variable continues to exist for as long as the object is needed in which the method is defined.


    正确答案: B,D
    解析: 本题是讨论变量的类型及作用域。