[jcifs] authentication not working

Ashok Kumar K AshokKumar_220060 at infosys.com
Fri Aug 24 06:38:53 GMT 2007


Hi Torben

 

   Thank you for your fast response here I am giving the my web.xml
file,

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<display-name>Welcome to Tomcat</display-name>

  <description>

     Welcome to Tomcat

 </description>

 

<filter>

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

 

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

 

 

 

                        <init-param>

 

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

 

 
<param-value>HYDHTCGDC02</param-value>

 

                        </init-param>

                        

 

</filter>

<filter-mapping>

 

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

 

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

 

</filter-mapping>

           

 

   

<servlet>

 <servlet-name>Mainservlet</servlet-name>

 <servlet-class>pack.MainServlet</servlet-class>

</servlet>

 

<servlet>

 <servlet-name>Revenueservlet</servlet-name>

 <servlet-class>pack.RevenueServlet</servlet-class>

</servlet>

 

<servlet>

 <servlet-name>Qualityservlet</servlet-name>

 <servlet-class>pack.QualityServlet</servlet-class>

</servlet>

 

<servlet>

 <servlet-name>Alconservlet</servlet-name>

 <servlet-class>pack.AlconServlet</servlet-class>

</servlet>

<servlet> 

    <servlet-name>chartViewer</servlet-name> 

    <servlet-class>pack.ChartViewer</servlet-class> 

  </servlet>

   

 

 

 

<servlet-mapping>

 <servlet-name>Mainservlet</servlet-name>

 <url-pattern>/mainservlet</url-pattern>

</servlet-mapping>

 

 

<servlet-mapping>

 <servlet-name>Revenueservlet</servlet-name>

 <url-pattern>/revenueservlet</url-pattern>

</servlet-mapping>

 

<servlet-mapping>

 <servlet-name>Qualityservlet</servlet-name>

 <url-pattern>/qualityservlet</url-pattern>

</servlet-mapping>

 

<servlet-mapping>

 <servlet-name>Alconservlet</servlet-name>

 <url-pattern>/alconservlet</url-pattern>

</servlet-mapping>

<servlet-mapping> 

    <servlet-name>chartViewer</servlet-name> 

    <url-pattern>/servlet/ChartViewer</url-pattern> 

  </servlet-mapping>

 

</web-app>

 

To tell you I am using jcifs1.1.11 jar file, and the application is
deployed over tomcat4.1. my intension of using ntlmhttpfilter is to
retrieve windows 

Login username. Below is the code I used in jsp to retrieve login user
name.

 

String remoteUser = "";

 

String id = "";

            

 

String auth = request.getHeader("Authorization");

 

            

                        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);

 

 
username1 = id;

 

I would be very great full to you if you help me out with this

 

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