[jcifs] Request.getRemoteUser() - Mozilla and IE differs

Göran Karlsson (KA/EAB) goran.karlsson at ericsson.com
Thu Jul 6 13:38:02 GMT 2006


Hello!

Update: I got the Ntlmfilter working on Tomcat now. I had other filters at the same time, and I inserted the Ntlmfilter in the wrong place. I put it last instead of first.

Now I have another problem. When I get the client user ID in a servlet with request.getRemoteUser() IE will give me domain\userid while Mozilla Firefox will give me only the userid. The domain should be the same for all the users in this case, so I could work around this by checking if the domain is there and in that case cut it off, or append it if it's not there. But the problem is that a lot of existing code is using getRemoteUser, and I can't go around and handle this everywhere. 

So how do I get the user id in the same way from both browsers? Surely somebody else here has had the same problem?

My filter configuration is as follows:

  <filter>
    <filter-name>NtlmHttpFilter</filter-name>
    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
    <init-param>
      <param-name>jcifs.smb.client.domain</param-name>
      <param-value>EEMEA</param-value>
    </init-param>
    <init-param>
      <param-name>jcifs.netbios.wins</param-name>
      <param-value>153.88.193.201,147.214.112.67</param-value>
    </init-param>
  </filter>

Any ideas are greatly appreciated.

/Göran
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list