单选题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.pri

题目
单选题
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);


相似考题
更多“单选题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.pri”相关问题
  • 第1题:

    Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted. Which listener class will accomplish this debugging goal?()

    • A、Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.
    • B、Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.
    • C、Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.
    • D、Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.

    正确答案:B

  • 第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题:

    You have a Web application that is configured for personalization. You need to access personalization data from one of the pages of the Web application by using the minimum amount of administrative effort. What should you do? ()

    • A、Access the personalization data from the Session property of the HttpContext object.
    • B、Access the personalization data from the Application property of the HttpContext object.
    • C、Access the personalization data from the Cache property of the HttpContext object.
    • D、Access the personalization data from the Profile property of the HttpContext object.

    正确答案:D

  • 第4题:

    You are troubleshooting an ASP.NET Web application. System administrators have recently expanded your web farm from one to two servers. Users are periodically reporting an error message about invalid view state. You need to fix the problem. What should you do?()

    • A、Set viewStateEncryptionMode to Auto in web.config on both servers.
    • B、Set the machineKey in machine.config to the same value on both servers.
    • C、Change the session state mode to SQLServer on both servers and ensure both servers use the same connection string.
    • D、Override the SavePageStateToPersistenceMedium and LoadPageStateFromPersistenceMedium methods in the page base class to serialize the view state to a local web server file.

    正确答案:B

  • 第5题:

    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

  • 第6题:

    You have a single Active Directory directory service domain. You have an application that adds Active Directory Schema attributes during installation. The attributes replicate as part of global catalog replication. Your user account is a member of the Domain Admins, Schema Admins, and Enterprise Admins global groups. You test the application and decide not to deploy it to production.  You need to ensure that the attributes that are added by the application are no longer available in Active Directory.  Using the Active Directory Schema snap-in,what should you do?()

    • A、 Clear the Index this attribute in the Active Directory option for each attribute that is added by the application.
    • B、 Clear the Attribute is active option for each attribute that is added by the application.
    • C、 Clear the Replicate this attribute to the Global Catalog option for each attribute that is added by the application.
    • D、 Clear the Allow this attribute to be shown in advanced view option for each attribute that is added by the application.

    正确答案:B

  • 第7题:

    You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You add a theme to the ASP.NET application.  You need to apply the theme to override any settings of individual controls.  What should you do?()

    • A、In the Web.config file of the application,set the Theme attribute of the pages element to the name of the theme.
    • B、In the Web.config file of the application,set the StyleSheetThemeattribute of the pages element to the name of the theme.
    • C、Add a master page to the application. In the @Master directive,set the Theme attribute to the name of the theme.
    • D、Add a master page to the application. In the @Master directive,set the StyleSheetTheme attribute to the name of the theme.

    正确答案:A

  • 第8题:

    单选题
    You have a Microsoft ASP.NET Framework version 1.0 application. The application does not use any features that are deprecated in the Microsoft .NET Framework version 3.5. The application runs on Microsoft IIS 6.0.  You need to configure the application to use the ASP.NET Framework version 3.5 withoutrecompiling the application.  What should you do? ()
    A

    Edit the ASP.NET runtime version in IIS 6.0.

    B

    Edit the System.Web section handler version number in the machine.config file.

    C

    Add the requiredRuntime configuration element to the Web.config file and set the version attribute to v3.5.

    D

    Add the supportedRuntime configuration element in the Web.config file and set the version attribute to v3.5.


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

  • 第9题:

    单选题
    Your company has an existing Windows Communication Foundation (WCF) service that allows business partners to place orders. The service uses netMsmqBinding. You find that processing every order in its own transaction is causing a delay. You need to ensure that the service is configured to process multiple orders in one transaction. What should you do? ()
    A

    Use service behavior and set the maxConcurrentCalls attribute.

    B

    Use endpoint behavior and set the maxBatchSize attribute.

    C

    Use endpoint behavior and set the maxPendingReceives attribute.

    D

    Use endpoint behavior.


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

  • 第10题:

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

  • 第11题:

    单选题
    You are evaluating a Windows Azure application. The application uses one instance of a web role. The role instance size is set to Medium. The application does not use SQL Azure.   You have the following requirements for scaling the application:   - Maximize throughput.  - Minimize downtime while scaling. - Increase system resources.   You need to recommend an approach for scaling the application.  What should you recommend?()
    A

     Set up vertical partitioning.

    B

     Set up horizontal partitioning.

    C

     Increase the number of role instances.

    D

     Change the role instance size to large.


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

  • 第12题:

    单选题
    Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted. Which listener class will accomplish this debugging goal?()
    A

    Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.

    B

    Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.

    C

    Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.

    D

    Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.


    正确答案: 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题:

    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

  • 第15题:

    You have a Microsoft ASP.NET Framework version 1.0 application. The application does not use any features that are deprecated in the Microsoft .NET Framework version 3.5. The application runs on Microsoft IIS 6.0.  You need to configure the application to use the ASP.NET Framework version 3.5 without recompiling the application.  What should you do?()

    • A、Edit the ASP.NET runtime version in IIS 6.0. 
    • B、Edit the System.Web section handler version number in the machine.config file. 
    • C、Add the requiredRuntime configuration element to the Web.config file and set the version attribute to v3.5. 
    • D、Add the supportedRuntime configuration element in the Web.config file and set the version attribute to v3.5.

    正确答案:A

  • 第16题:

    Your company has an existing Windows Communication Foundation (WCF) service that allows business partners to place orders. The service uses netMsmqBinding. You find that processing every order in its own transaction is causing a delay. You need to ensure that the service is configured to process multiple orders in one transaction. What should you do? ()

    • A、Use service behavior and set the maxConcurrentCalls attribute.
    • B、Use endpoint behavior and set the maxBatchSize attribute.
    • C、Use endpoint behavior and set the maxPendingReceives attribute.
    • D、Use endpoint behavior.

    正确答案:B

  • 第17题:

    Your network contains a Windows Server 2008 server that has the Web Server (IIS) server role installed.  You have a Web application that uses a custom application pool. The application pool is set to recycle every 1,440 minutes. The Web application does not support multiple worker processes.  You need to configure the application pool to ensure that users can access the Web application after the application pool is recycled. What should you do?()

    • A、Set the Shutdown Executable option to True.
    • B、Set the Process Orphaning Enabled option to True.
    • C、Set the Disable Overlapped Recycling option to True.
    • D、Set the Disable Recycling for Configuration Changes option to True.

    正确答案:C

  • 第18题:

    You write a logging function for a Web Form. You call the logging function from the Page_Unload event handler. You test the Web Form and notice that the Page_Unload event handler does not call the logging function. You need to ensure that the logging function is called. What are two possible ways to achieve this goal? ()

    • A、Set the Page attribute to AutoEventWireup="False". Remove the attribute onunload="Page_Unload" from the Web Form element.
    • B、Set the Page attribute to AutoEventWireup="False". Add the attribute OnUnload="Page_Unload" to the Web Form element.
    • C、Set the Page attribute to AutoEventWireup="False". Add the Web Form attribute autocomplete=on.
    • D、Set the Page attribute to AutoEventWireup="True".

    正确答案:B,D

  • 第19题:

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

  • 第20题:

    单选题
    You have a Web application that is configured for personalization. You need to access personalization data from one of the pages of the Web application by using the minimum amount of administrative effort. What should you do?()
    A

     Access the personalization data from the Session property of the HttpContext object.

    B

     Access the personalization data from the Application property of the HttpContext object.

    C

     Access the personalization data from the Cache property of the HttpContext object.

    D

     Access the personalization data from the Profile property of the HttpContext object.


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

  • 第21题:

    单选题
    You have a single Active Directory directory service domain. You have an application that adds Active Directory Schema attributes during installation. The attributes replicate as part of global catalog replication. Your user account is a member of the Domain Admins, Schema Admins, and Enterprise Admins global groups. You test the application and decide not to deploy it to production.  You need to ensure that the attributes that are added by the application are no longer available in Active Directory.  Using the Active Directory Schema snap-in,what should you do?()
    A

     Clear the Index this attribute in the Active Directory option for each attribute that is added by the application.

    B

     Clear the Attribute is active option for each attribute that is added by the application.

    C

     Clear the Replicate this attribute to the Global Catalog option for each attribute that is added by the application.

    D

     Clear the Allow this attribute to be shown in advanced view option for each attribute that is added by the application.


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

  • 第22题:

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

  • 第23题:

    单选题
    Users of your web application have requested that they should be able to set the duration of their sessions.So for example, one user might want a webapp to stay connected for an hour rather than the webapp’sdefault of fifteen minutes; another user might want to stay connected for a whole day. Furthermore, youhave a special login servlet that performs user authentication and retrieves the User object from the database. You want to augment this code to set up the user’s specified session duration. Which codesnippet in the login servlet will accomplish this goal?()
    A

    User user = // retrieve the User object from the database session.setDurationInterval(user.getSessionDuration());

    B

    User user = // retrieve the User object from the database session.setMaxDuration(user.getSessionDuration());

    C

    User user = // retrieve the User object from the database session.setInactiveInterval(user.getSessionDuration());

    D

    User user=//retrieve the User object from the database session.setDuration(user.getSessionDuratio());

    E

    User user = // retrieve the User object from the database session.setMaxInactiveInterval(user.getSessionDuration());


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

  • 第24题:

    单选题
    You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You add a theme to the ASP.NET application.  You need to apply the theme to override any settings of individual controls.  What should you do?()
    A

    In the Web.config file of the application,set the Theme attribute of the pages element to the name of the theme.

    B

    In the Web.config file of the application,set the StyleSheetThemeattribute of the pages element to the name of the theme.

    C

    Add a master page to the application. In the @Master directive,set the Theme attribute to the name of the theme.

    D

    Add a master page to the application. In the @Master directive,set the StyleSheetTheme attribute to the name of the theme.


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