Which interface must a class implement to be informed of a s

题目
单选题
Which interface must a class implement to be informed of a session creation event?()
A

 javax.servlet.http.HttpSessionListener

B

 javax.servlet.http.HttpSessionBindingListener

C

 javax.servlet.http.HttpSessionCreationListener

D

 javax.servlet.http.HttpSessionActivationListener

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are creating a Windows Communication Foundation (WCF) service that responds using plain-old XML (POX).You have the following requirements: You must enable the /catalog.svc IItems operation to respond using the POX, JSON, or ATOM formats. You also must ensure that the same URL is used regardless of the result type. You must determine the response format by using the Accepts HTTP header.What should you do?()

  • A、Implement the IChannelInitializer interface in the service class.
  • B、Implement the System.Runtime.Serialization.IFormatterConverter interface in the service class.
  • C、Set the BodyStyle parameter of the WebGet attribute on the operation to WebMessageBodyStyle.WrappedResponse.
  • D、Set the retum type of the operation to System.ServiceModel.Channels.Message. Use the current WebOperationContext methods to return the data in the required format.

正确答案:D

第2题:

Which interface must a class implement so that instances of the class are notified after any object is addedto a session?()

  • A、javax.servlet.http.HttpSessionListener
  • B、javax.servlet.http.HttpSessionValueListener
  • C、javax.servlet.http.HttpSessionBindingListener
  • D、javax.servlet.http.HttpSessionAttributeListener

正确答案:D

第3题:

You are developing a Windows Communication Foundation (WCF) service that contains the following service contract.[ServiceContract()]public interface IPaymentService{ [OperationContract()] void RecordPayments(Person person);}public class Person{ ... }public class Employee : Person{ ... }public class Customer : Person{ ... }You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object.What should you do?()

A. Add the following KnownType attribute to the Employee class and to the Customer class. [KnownType(GetType(Person))]

B. Implement the IExtensibleDataObject interface in the Person class.

C. Implement the IExtension(ofType(T)) interface in the Person class.

D. Add the following KnownType attributes to the Person class. [KnownType(GetType(Employee))] [KnownType(GetType(Customer))]


参考答案:D

第4题:

Which statements about inheritance are true?()         

  • A、 In Java programming language only allows single inheritance.
  • B、 In Java programming language allows a class to implement only one interface.
  • C、 In Java programming language a class cannot extend a class and implement a interface together.
  • D、 In Java programming language single inheritance makes code more reliable.

正确答案:A,D

第5题:

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

正确答案:D

第6题:

Which interface must a class implement to be informed of a session creation event?()

  • A、 javax.servlet.http.HttpSessionListener
  • B、 javax.servlet.http.HttpSessionBindingListener
  • C、 javax.servlet.http.HttpSessionCreationListener
  • D、 javax.servlet.http.HttpSessionActivationListener

正确答案:A

第7题:

Voice quality is bad due to high delay and jitter on a link. Which two actions will improve the quality  of voice calls?()

  • A、Increase the queue size of the voice class.
  • B、Guarantee bandwidth during congestion to the voice class with a bandwidth command.
  • C、Increase the tx-ring of the egress interface.
  • D、Implement LLQ for the voice class.
  • E、Decrease the rx-ring of the egress interface.
  • F、Decrease the queue size of the voice class.

正确答案:D,F

第8题:

A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed.  Which two are true? ()

  • A、 A  element in the echo tag LTD must have the value JSP
  • B、 The echo tag handler must define the setAttribute (String key, String value) method
  • C、 The true element must appear in the echo tag TLD
  • D、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface
  • E、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface

正确答案:C,E

第9题:

Which the two demonstrate an “is a” relationship?()

  • A、 public interface Person {}  Public class Employee extends Person {}
  • B、 public interface Shape {}  public interface Rectangle extends Shape {}
  • C、 public interface Color {}  public class Shape { private Color color; }
  • D、 public class Species {}  public class Animal { private Species species; }
  • E、 interface Component {} Class Container implements Component {private Component [] children;

正确答案:B,E

第10题:

Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true?()

  • A、The class implements java.lang.Comparable.
  • B、The class implements java.util.Comparator.
  • C、The interface used to implement sorting allows this class to define only one sort sequence.
  • D、The interface used to implement sorting allows this class to define many different sort sequences.

正确答案:A,C

更多相关问题