[jcifs] returning null username only in Mozilla

vardhaman narasagoudar vardhamanbn at gmail.com
Wed Nov 14 09:27:28 GMT 2007


Hello ,

  I am trying for windows Authentication ..using JSP. +JCIFS + Netbeans+
Orcale. When I run the application on IE it run properly displaying the
username and the domain name. But when I run the same application on Mozilla
I am able to get only the username but *not the domain name. *How can I
overcome this problem?

I am using
1. String sysUser = request.getRemoteUser();
    out.println(sysUser);
2. jcifs.smb.NtlmPasswordAuthentication auth =
  (jcifs.smb.NtlmPasswordAuthentication
)request.getSession().getAttribute("NtlmHttpAuth");

  String user = auth.getUsername();
  String domain = auth.getDomain();

  out.println("user "+ user);
  out.println("domain"+ domain);

this is the web.xml file

<filter>
  <filter-name>NtlmHttpFilter</filter-name>
  <filter-class>jcifs.http.NtlmHttpFilter</filter-class>

  <init-param>
      <param-name>jcifs.http.domainController</param-name>
      <param-value>192.168.1.11</param-value>
  </init-param>

  <init-param>
      <param-name>jcifs.smb.client.domain</param-name>
      <param-value>NYC-USERS</param-value>
  </init-param>
  <init-param>
      <param-name>jcifs.smb.client.username</param-name>
      <param-value>somenycuser</param-value>
  </init-param>
  <init-param>
      <param-name>jcifs.smb.client.password</param-name>
      <param-value>AReallyLoooongRandomPassword</param-value>
  </init-param>
</filter>

<filter-mapping>
  <filter-name>NtlmHttpFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

How can I display/ read the domain name in when running the application on
Mozilla?

Looking forward for your reply.

-- 
Thanks & Regards
Vardhaman B.N
9945840928
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list