Howdy Luven, welcome to the Ranch! If the LOGON_USER element you are referring to is an environment variable, then there is no supported way in Java (and this is in general, not just in the JSP arena) to obtain its value. What is generally done is to take the value of 'interesting' environment variables and declare them as Java system properties which you can then access through Java APIs. But I'm not even sure that this is what you really want to do since generally the servlet container is run as root. What user value are you really trying to obtain? The user logged on that is using the browser? The user that started the server? Other? bear
Well what I am trying to do is we have an intranet application written in JSP and I want to athenticate the user, without a login prompting for credentials. So I need to access the the userid from the our network. Does this help, is there anything I can do to access this information?
As far as I know, there is no standard Java way to accomplish this (not surprising since it is platform-specific). If you will give details as to the nature of your intranet (what OS, what servlet container, and so on), perhaps someone has worked out a hack to do this for your configuration. IMHO, your best bet is for your intranet to perform its own authentication -- either home-grown or container-managed. bear [ October 06, 2003: Message edited by: Bear Bibeault ]
A web server isn't the same thing as a LAN server. What you're almost certainly trying to do is extract the username by which the intranet user logged into a Windows Domain. That information isn't part of the Internet HTTP protocols, since I could be connected to multiple HTTP servers all over the world, some of which might be located on machines on Windows domains that were totally unrelated (and might even have my domain user id assigned to some other person entirely).
That would be a SSO solution and it's generally messy and/or expensive. You need some sort of authentication server that makes common cause between Windows Networking and HTTP. Also, each intranet user that uses such authentication for HTTP requires that their copy of Internet Explorer be set to permit it. Yes, I know it's hard to believe, but there is a security feature that Microsoft left turned OFF by default.
Customer surveys are for companies who didn't pay proper attention to begin with.