QuestionQ25

VerifiedSecure Software Concepts

Which method in the HttpServletRequest interface determines the principal name of the current user and returns a java.security.Principal object?

Explanation

HttpServletRequest.getUserPrincipal() returns a java.security.Principal containing the name of the current authenticated user; it returns null when no user has been authenticated.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!