nerdexam
Oracle

1Z0-899 · Question #105

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…

The correct answer is A. public class UserPrefLoader implements HttpSessionListener. See the full explanation below for the reasoning.

Question

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.prefs package APIs and you have been ordered to reuse this subsystem in your web application.You need to create 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 can accomplish this goal?

Options

  • Apublic class UserPrefLoader implements HttpSessionListener
  • Bpublic class UserPrefLoader implements SessionListener
  • Cpublic class UserPrefLoader implements HttpSessionListener
  • Dpublic class UserPrefLoader implements SessionListener

How the community answered

(41 responses)
  • A
    83% (34)
  • B
    10% (4)
  • C
    2% (1)
  • D
    5% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice