nerdexam
Oracle

1Z0-899 · Question #11

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 correct answer is E. User user = / / retrieves the user objects object from the database. See the full explanation below for the reasoning.

Question

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's default of fifteen minutes; another user might want to stay connected for a whole day. Furthermore, you have a special login servlet that performs user authentication and retrieves the object from the database. You want to augment this code to set up the user's specified session duration. Which code snippet in the login servlet will accomplish this goal?

Options

  • AUser user = / / retrieves the user objects object from the database
  • BUser user = / / retrieves the User objects from the database
  • CUser user = / / retrieves the user objects object from the database
  • DUser user = / / retrieves the user objects object from the database
  • EUser user = / / retrieves the user objects object from the database
  • FUser user = / / retrieves the user objects object from the database

How the community answered

(40 responses)
  • A
    3% (1)
  • B
    10% (4)
  • C
    5% (2)
  • E
    80% (32)
  • F
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice