2 Replies Latest reply: Jul 19, 2012 2:53 AM by gimbal2 RSS

    Accessing list of client window login name from server in JAVA

      how to get the client windows login name in server using JAVA those who access the site?
      I used the following code, but im getting only local machine name . getRemoteUser() is returning null value. I am using tomcat server.
      Is there anything to do with windows IIS configuration??
      protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
      String clientIP = request.getRemoteAddr();
      // Get client's host name
      String clintHost = request.getRemoteHost();
      String user = request.getRemoteUser();
      String computerName = InetAddress.getLocalHost().getHostName();
      PrintWriter out = response.getWriter();
      out.println("IP : " + clientIP);
      out.println("Host: " + clintHost);
      out.println("Remote User: "+user);
      out.println("Local User: "+ computerName);