It's null as you get , It only has a value if the client has
been requested to authenticate by his browser when he gets the page (and
it´s configured in your web server)
So this null value means the user can get the page without
authentification.
Have a nice day!!!!
-----Original Message-----
From: Annu Singh <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, June 23, 1999 11:36 AM
Subject: How to get information about the remote user?Hi,Does anyone know how to get the remore user ID/Login (or where I am going wrong )?I have written a sample servlet which should get me information about the client.The code snippet follows:
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
ServletOutputStream out = res.getOutputStream();
res.setContentType("text/html");
out.println("<html>\n");
out.println("<title>MyTrialServlet</title>\n<body>Should have va
lues for the client side.<BR>\n");
out.println("Protocol: " + req.getProtocol());
out.println("Servername: " + req.getServerName());out.println("User: " + req.getRemoteUser());
out.println("Host: " + req.getRemoteHost());.........................
From this I am able to get the Protocol, Server IP address but I am not getting the values for the "Remote User" and "Remote Host" (marked in red). The value is coming to be "null".Thanks in advance.Regards,Annu Singh
