[jcifs] rookie here. request.getparameter() doesn't work .help pretty pls

Vaduvoiu Tiberiu vaduvoiutibi at yahoo.com
Wed Aug 1 09:52:24 GMT 2007


I am runing Tomcat 6.0.13, and I am trying to do a web application for a intranet. I need to display the username on one of the pages. First I solved the problem using the solution on this page:
http://www.jguru.com/faq/viewquestion.jsp?EID=393110 but then couple of people suggested I should use jcifs. I try understanding the install procedure from
http://jcifs.samba.org/src/docs/ntlmhttpauth.html#install

but I tried and no luck. So..copyed the jar in the lib of my project, then in web.xml I wrote 

 <filter>
    <filter-name>NtlmHttpFilter</filter-name>
    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
    <init-param>
        <param-name>jcifs.netbios.wins</param-name>
        <param-value>localhost,xx.xxx.xx.xxx(my ip)</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>


and then in my index.jsp I just wrote out.println(request.getRemoteUser()); Of course, it didn;t work. I get the error

java.lang.NullPointerException
 jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:109)
 jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:150)
 jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)


is there any other configuration I need to do? any import or extend in my jsp? is my filter declaration wrong? can anyone tell me what am I doing wrong?? 10x a lot in advance


       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/


More information about the jcifs mailing list