[jcifs] problem with jcifs 1.2.17 + NtlmHttpFilter

Ashok Kumar K AshokKumar_220060 at infosys.com
Fri Mar 14 07:57:32 GMT 2008


Hi,

 I am have been using NtlmHttpFilter for retrieving logged in user name in a domain in my web application. Then jcifs version I used is jcifs 1.1.11, now I moved to version
Jcifs1.2.17 now the problem is the filter class stopped working and I get error message saying ' Error filter Start' on server console ( tomcat 5).
With this even the application context initialization also getting stopped. Below are entries in web.xml  and code I used  for retrieving logged in user name.
I would be great full to you if you could help me in finding out where I am going wrong and its work around.

<filter>

     <filter-name>NtlmHttpFilter</filter-name>

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

 <init-param>

            <param-name>jcifs.http.domainController</param-name>

            <param-value>my domain</param-value>

 </init-param>

 <init-param>

            <param-name>jcifs.util.loglevel</param-name>

            <param-value>4</param-value>

 </init-param>


</filter>

<filter-mapping>

            <filter-name>NtlmHttpFilter</filter-name>

            <url-pattern>/*</url-pattern>

</filter-mapping>

And the code for retrieving logged in user name is


java.security.Principal principal = request.getUserPrincipal();

System.out.println(" Security principal :"+principal);

                        if(principal !=null){

                                    remoteUser = principal.getName();

                                    int number = remoteUser.lastIndexOf("\\");

                                    id = remoteUser.substring(number+1);

                                    id = id.toUpperCase();

                        }



  System.out.println("[SED INFO MESSAGE] - SED - Message: User ID = " + id);

   String username1 = id;

Thanks for your time. Thanks in advance.

Thanks & regards,

Ashok kumar k| Software Engineer| Enterprise Solutions|Infosys Technologies Limited|Hyderabad| Tel: (040) 23005222 Extn:48663|Mobile: 9966010691



**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list