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

Göran Karlsson (KA/EAB) goran.karlsson at ericsson.com
Fri Jul 7 12:34:30 GMT 2006

We ended up hacking into jCIFS and removed the domain there... not a very nice solution, but I hope there are no undiscovered side-effects. :-/


From: jcifs-bounces+goran.karlsson=ericsson.com at lists.samba.org [mailto:jcifs-bounces+goran.karlsson=ericsson.com at lists.samba.org] On Behalf Of Ghouse, Sherjeel
Sent: den 6 juli 2006 15:47
To: jcifs at lists.samba.org
Subject: RE: [jcifs] Request.getRemoteUser() - Mozilla and IE differs

I had a similar situation where Application was accessed using different browsers and over VPN (trusted domains).  Since my application is Servlet based. I was able to trim the domain name(Intranet, VPN, IE) or no domain (in case of FireFox) by overriding get() of the HttpServlet. You could use StrinkTokenizer or whatever logic to figure out if domain name comes in getRemoteUser() or not. You could then store the UserName in HttpSession to be used all over your application. 
Hope that helps.

	-----Original Message----- 

	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?  


-------------- next part --------------
HTML attachment scrubbed and removed

More information about the jcifs mailing list