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
2 months agoEmeline
2 months agoMerissa
3 months agoCarmelina
3 months agoBrandon
3 months agoElly
3 months agoMarvel
4 months agoSanjuana
4 months agoFrank
4 months agoRosenda
4 months agoLorrine
4 months agoJolene
4 months agoMarsha
5 months agoMabel
7 months agoIrma
5 months agoChery
5 months agoJutta
6 months agoJeanice
7 months agoJohnetta
7 months agoJoni
7 months agoFrancine
7 months agoMeghann
7 months agoDeandrea
7 months agoJaclyn
7 months agoCecil
7 months agoAngella
7 months agoAlexis
7 months agoMabel
8 months ago