This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
We are developing a web application with Single Sign On (SSO) feature using
struts 1.2 and are using tomcat 6.0 container for deployment. We want to
achieve a scenario similar to Windows Authentication.
For this we want to know the user (user name who has logged in to the
Windows OS) who has hit the website URL.
I tried to use APIs of HttpServletRequest class. It gives me client IP
address, but when I try something like httpServletRequest.getRemoteUser()
it returns null (Struts documentation says that getRemoteUser() will return
username only if the user is already authenticated).
Does the HttpServletRequest object contain this information? Is there any
other way to get the user name?
Maneesh, m extremely sorry for posting this topic in the wrong forum... will be careful next time...
seetharaman I tried using HttpServletRequest.getRemoteUser()... but it returns NULL, although I'm able to retrieve Client IP from the request object using HttpServletRequest.getRemoteHost().
Is there some other configuration that i need to set before i use getRemoteUser() function?