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

Eric Glass eric.glass at gmail.com
Wed Aug 1 11:32:42 GMT 2007


For the values in web.xml, they should be:

jcifs.netbios.wins -- comma-delimited list of WINS servers in your
environment.  Localhost will almost certainly not be correct.  From a DOS
prompt you can do:

    ipconfig /all

which should list a "Primary WINS Server" entry you can use.

jcifs.smb.client.domain,jcifs.smb.client.username,jcifs.smb.client.password--
should be the domain, username, and password for a real account in
your
environment (you probably already have this specified; just confirming that
you did replace the "real" values for the example ones below).


On 8/1/07, Vaduvoiu Tiberiu <vaduvoiutibi at yahoo.com> wrote:
>
> 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/
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list