Which statement is true about web container session management?()A、Access to session-scoped attributes is guaranteed to be thread-safe by the web container.B、To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.

题目

Which statement is true about web container session management?()

  • A、Access to session-scoped attributes is guaranteed to be thread-safe by the web container.
  • B、To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.
  • C、If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.
  • D、The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.

相似考题
更多“Which statement is true about web container session management?()A、Access to session-scoped attributes is guaranteed to be thread-safe by the web container.B、To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.”相关问题
  • 第1题:

    A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()

    • A、id
    • B、name
    • C、bean
    • D、type
    • E、scope

    正确答案:A,D,E

  • 第2题:

    One of the use cases in your web application uses many session-scoped attributes. At the end of the usecase,you want to clear out this set of attributes from the session object. Assume that this static variableholds this set of attribute names: 201.private static final Set USE_CASE_ATTRS;  202.static { 203.USE_CASE_ATTRS.add("customerOID"); 204.USE_CASE_ATTRS.add("custMgrBean"); 205.USE_CASE_ATTRS.add("orderOID"); 206.USE_CASE_ATTRS.add("orderMgrBean"); 207.} Which code snippet deletes these attributes from the session object?()

    • A、session.removeAll(USE_CASE_ATTRS);
    • B、for ( String attr : USE_CASE_ATTRS ) {session.remove(attr);}
    • C、for ( String attr : USE_CASE_ATTRS ) {session.removeAttribute(attr);}
    • D、for ( String attr : USE_CASE_ATTRS ) {session.deleteAttribute(attr);}
    • E、session.deleteAllAttributes(USE_CASE_ATTRS);

    正确答案:C

  • 第3题:

    A developer is designing a web application that must support multiple interfaces,including: an XML web service for B2B HTML for web-based clients WML for wireless customers. Which designpattern provides a solution for this problem?()

    • A、Session Facade
    • B、Business Delegate
    • C、Data Access Object
    • D、Model-View-Controller
    • E、Chain of Responsibility

    正确答案:D

  • 第4题:

    Which the statement is true about web container session management()?

    • A、 Access to session-scoped attributes is guaranteed to be thread-safe by the web container.
    • B、 To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.
    • C、 If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.
    • D、 The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.

    正确答案:C

  • 第5题:

    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

  • 第6题:

    You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application uses Session objects. You are modifying the application to run on a Web farm. You need to ensure that the application can access the Session objects from all the servers in the Web farm. You also need to ensure that when any server in the Web farm restarts or stops responding, the Session objects are not lost.  What should you do?()

    • A、Use the InProc Session Management mode to store session data in the ASP.NET worker process. 
    • B、Use the SQLServer Session Management mode to store session data in a common Microsoft SQL Server 2005 database. 
    • C、Use the SQLServer Session Management mode to store session data in an individual database for each Web server in the Web farm. 
    • D、Use the StateServer Session Management mode to store session data in a common State Server process on a Web server in the Web farm. 

    正确答案:B

  • 第7题:

    单选题
    One of the use cases in your web application uses many session-scoped attributes. At the end of the usecase,you want to clear out this set of attributes from the session object. Assume that this static variableholds this set of attribute names: 201.private static final Set USE_CASE_ATTRS;  202.static { 203.USE_CASE_ATTRS.add("customerOID"); 204.USE_CASE_ATTRS.add("custMgrBean"); 205.USE_CASE_ATTRS.add("orderOID"); 206.USE_CASE_ATTRS.add("orderMgrBean"); 207.} Which code snippet deletes these attributes from the session object?()
    A

    session.removeAll(USE_CASE_ATTRS);

    B

    for ( String attr : USE_CASE_ATTRS ) {session.remove(attr);}

    C

    for ( String attr : USE_CASE_ATTRS ) {session.removeAttribute(attr);}

    D

    for ( String attr : USE_CASE_ATTRS ) {session.deleteAttribute(attr);}

    E

    session.deleteAllAttributes(USE_CASE_ATTRS);


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

  • 第8题:

    单选题
    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
    解析: 暂无解析

  • 第9题:

    单选题
    You have a use case in your web application that adds several session-scoped attributes. At the end of theuse case, one of these objects, the manager attribute, is removed and then it needs to decide which of theother session-scoped attributes to remove. How can this goal be accomplished?()
    A

    The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.

    B

    The object of the manager attribute should implement the HttpSessionListener and it should call the removeAttribute method on the appropriate session attributes.

    C

    The object of the manager attribute should implement the HttpSessionBindingListener and it should call the deleteAttribute method on the appropriate session attributes.

    D

    The object of the manager attribute should implement the HttpSessionListener and it should call the deleteAttribute method on the appropriate session attributes.


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

  • 第10题:

    单选题
    Which the statement is true about web container session management()?
    A

     Access to session-scoped attributes is guaranteed to be thread-safe by the web container.

    B

     To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.

    C

     If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.

    D

     The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.


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

  • 第11题:

    多选题
    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()
    A

    Add attributes to the session object.

    B

    Add attributes on the request object.

    C

    Add parameters to the request object.

    D

    Use the pageContext object to add request attributes.

    E

    Add parameters to the JSP’s URL when generating the request dispatcher.


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

  • 第12题:

    单选题
    Which method must be used to encode a URL passed as an argument to HttpServletResponse.sendRedirect when using URL rewriting for session tracking?()
    A

    ServletResponse.encodeURL

    B

    HttpServletResponse.encodeURL

    C

    ServletResponse.encodeRedirectURL

    D

    HttpServletResponse.encodeRedirectURL


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

  • 第13题:

    You have a use case in your web application that adds several session-scoped attributes. At the end of theuse case, one of these objects, the manager attribute, is removed and then it needs to decide which of theother session-scoped attributes to remove. How can this goal be accomplished?()

    • A、The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.
    • B、The object of the manager attribute should implement the HttpSessionListener and it should call the removeAttribute method on the appropriate session attributes.
    • C、The object of the manager attribute should implement the HttpSessionBindingListener and it should call the deleteAttribute method on the appropriate session attributes.
    • D、The object of the manager attribute should implement the HttpSessionListener and it should call the deleteAttribute method on the appropriate session attributes.

    正确答案:A

  • 第14题:

    A developer for the Company.com web site has been told that users may turn off cookie support in their browsers. What must the developer do to ensure that these customers can still use the web application?()  

    • A、 The developer must ensure that every URL is properly encoded using the appropriate URL rewriting APIs
    • B、 The developer must provide an alternate mechanism for managing sessions and abandon theHttpSession mechanism entirely
    • C、 The developer can ignore this issue. Web containers are required to support automatic URL rewriting when cookies are not supported
    • D、 The developer must ass the string ?id= to the end of every URL to ensure that the conversion with the browser can continue.

    正确答案:A

  • 第15题:

    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()

    • A、Add attributes to the session object.
    • B、Add attributes on the request object.
    • C、Add parameters to the request object.
    • D、Use the pageContext object to add request attributes.
    • E、Add parameters to the JSP’s URL when generating the request dispatcher.

    正确答案:B,E

  • 第16题:

    Which the two about WAR files are true?()

    • A、 WAR files must be located in the web application library directory.
    • B、 WAR files must contain the web application deployment descriptor.
    • C、 WAR files must be created by using archive tools to designed specifically for that purpose. 
    • D、 The web container must serve the content of any META-INF directory located in a WAR file.
    • E、 The web container must allow access to resources in JARs in the web application library directory

    正确答案:B,E

  • 第17题:

    A developer is designing a web application that must support multiple interfaces, including:   • an XML web service for B2B • HTML for web-based clients • WML for wireless customers   Which design pattern provides a solution for this problem?( )

    • A、 Session Façade
    • B、 Business Delegate
    • C、 Data Access Object
    • D、 Model-View-Controller
    • E、 Chain of Responsibility

    正确答案:D

  • 第18题:

    You are the desktop administrator for your company. Your company’s software developers use Windows XP Professional and IIS on their client computers to develop Web-based applications. All client computers use Microsoft Internet Explorer 6. 0 or later as their Web browser. One of the developers reports that he can no longer access the Web-based application on his desktop by using his Web browser. When you attempt to access the application by using your Web browser, you receive the following error message: “Cannot find server or DNS Error.” You verify that the World Wide Web Publishing Service is started on the developer’s computer. You also verify that you are using the correct URL to access the developer’s computer by using your Web browser. You need to ensure that the developer can access the Web application by using his Web browser. How should you configure the developer’s computer?() 

    • A、Start the default Web site.
    • B、Start the IIS Admin Service.
    • C、Run the IPconfig /registerdns command.
    • D、In the default Web site properties,disable the host header setting.

    正确答案:A

  • 第19题:

    多选题
    A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()
    A

    id

    B

    name

    C

    bean

    D

    type

    E

    scope


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

  • 第20题:

    单选题
    Which statement is true about web container session management?()
    A

    Access to session-scoped attributes is guaranteed to be thread-safe by the web container.

    B

    To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.

    C

    If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.

    D

    The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.


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

  • 第21题:

    多选题
    Given in a single JSP page:   Which two are true?()
    A

    The prefix ’java’ is reserved.

    B

    The URI ’myTags’ must be properly mapped to a TLD file by the web container.

    C

    A translation error occurs because the prefix is considered identical by the web container.

    D

    For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.


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

  • 第22题:

    单选题
    You are the desktop administrator for your company. Your company’s software developers use Windows XP Professional and IIS on their client computers to develop Web-based applications. All client computers use Microsoft Internet Explorer 6. 0 or later as their Web browser. One of the developers reports that he can no longer access the Web-based application on his desktop by using his Web browser. When you attempt to access the application by using your Web browser, you receive the following error message: “Cannot find server or DNS Error.” You verify that the World Wide Web Publishing Service is started on the developer’s computer. You also verify that you are using the correct URL to access the developer’s computer by using your Web browser. You need to ensure that the developer can access the Web application by using his Web browser. How should you configure the developer’s computer?()
    A

    Start the default Web site.

    B

    Start the IIS Admin Service.

    C

    Run the IPconfig /registerdns command.

    D

    In the default Web site properties,disable the host header setting.


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

  • 第23题:

    单选题
    A developer is designing a web application that must support multiple interfaces, including:   • an XML web service for B2B • HTML for web-based clients • WML for wireless customers   Which design pattern provides a solution for this problem?( )
    A

     Session Façade

    B

     Business Delegate

    C

     Data Access Object

    D

     Model-View-Controller

    E

     Chain of Responsibility


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

  • 第24题:

    单选题
    Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()
    A

    javax.servlet.http.HttpSessionListener

    B

    javax.servlet.http.HttpSessionBindingListener

    C

    javax.servlet.http.HttpSessionAttributeListener

    D

    javax.servlet.http.HttpSessionActivationListener


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