Detect user logged on a computer using Java web app

This is my solution:

Put jcifs-1.2.7.jar on [TOMCAT_HOME]/common/lib directory.

Modify application's web.xml adding the followin text to section webapp:

<filter>
    <filter-name>NtlmHttpFilter</filter-name>
    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
    <init-param>
        <param-name>jcifs.http.domainController</param-name>
        <param-value>xx.xx.xx.xxx</param-value>  --> Domain Controller IP
    </init-param>
    <init-param>
        <param-name>jcifs.util.loglevel</param-name>
        <param-value>2</param-value>
    </init-param>
  </filter>
  <filter-mapping>
       <filter-name>NtlmHttpFilter</filter-name>
       <url-pattern>/*</url-pattern>
  </filter-mapping>

And the you can get the remote user using request.getRemoteUser() whithout prompt.

See you.