单项选择题
Your web site has many user-customizable features, for example font and color preferences on web pages.Your IT department has already built a subsystem for user preferences using Java SE’s lang.util.prefspackage APIs and you have been ordered to reuse this subsystem in your web application. You need tocreate an event listener that stores the user’s Preference object when an HTTP session is created. Also,note that user identification information is stored in an HTTP cookie.
Which partial listener class canaccomplish this goal?()
A.
B.
C.
D.
相关考题
-
单项选择题
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. -
单项选择题
You have built a web application that you license to small businesses. The webapp uses a context parameter, called licenseExtension, which enables certain advanced features based on your client’s licensepackage. When a client pays for a specific service, you provide them with a license extension key that theyinsert into the of the deployment descriptor. Not every client will have this contextparameter so you need to create a context listener to set up a default value in the licenseExtensionparameter. Which code snippet will accomplish this goal?()
A.
B.
C.
D. -
单项选择题
You have a simple web application that has a single Front Controller servlet that dispatches to JSPs togenerate a variety of views. Several of these views require further database processing to retrieve the necessary order object using the orderID request parameter. To do this additional processing, you pass therequest first to a servlet that is mapped to the URL pattern /WEB INF/retreiveOrder.do in the deploymentdescriptor. This servlet takes two request parameters, the orderID and the jspURL. It handles the databasecalls to retrieve and build the complex order objects and then it dispatches to the jspURL. Which codesnippet in the Front Controller servlet dispatches the request to the order retrieval servlet?()
A.
B.
C.
D.
