HttpServletRequest Contains two methods 1. getRemoteUser() 2. getUserPrinicipal().getName() Both returns a String with usernam is there any difference between these names.. ans besides this is there any use of Principal object obtained through getUserPrincipal.
Share Knowledge to gain it.
SCJP 2, SCWCD 2, SCDJWS, IBM 141 (In Progress), IBM 486 (Next)
Ko Ko Naing
posted 13 years ago
Actually both of the methods return the same thing but since the Principal is an interface, it can deal with stuff like Security Certificate, Public Key and so on... Actually if the Principal interface is used as extended subclasses like Identity, KerberosPrincipal, X500Principal, it will be more useful... Hope the above explanation helps you sthing... :roll:
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0