Which of the following methods determines the principle name of the current user and returns the jav
a.security.Principal object in the HttpServletRequest interface?
The getUserPrincipal() method determines the principle name of the current user and returns the java.security.Principal object. The
java.security.Principal object contains the remote user name. The value of the getUserPrincipal() method returns null if no user is
authenticated.
Answer C is incorrect. The getRemoteUser() method returns the user name that is used for the client authentication. The value of the
getRemoteUser() method returns null if no user is authenticated.
Answer B is incorrect. The isUserInRole() method determines whether the remote user is granted a specified user role. The value of the
isUserInRole() method returns true if the remote user is granted the specified user role; otherwise it returns false.
Answer D is incorrect. The getCallerPrincipal() method is used to identify a caller using a java.security.Principal object. It is not used in
the HttpServletRequest interface.
Anjelica
7 months agoEmeline
7 months agoMerissa
7 months agoCarmelina
7 months agoBrandon
8 months agoElly
8 months agoMarvel
8 months agoSanjuana
8 months agoFrank
8 months agoRosenda
9 months agoLorrine
9 months agoJolene
9 months agoMarsha
9 months agoMabel
11 months agoIrma
10 months agoChery
10 months agoJutta
11 months agoJeanice
11 months agoJohnetta
12 months agoJoni
12 months agoFrancine
11 months agoMeghann
11 months agoDeandrea
12 months agoJaclyn
12 months agoCecil
12 months agoAngella
11 months agoAlexis
11 months agoMabel
1 year ago