[jcifs] JCIFS with Windows Vista / IE 7

Michael B Allen ioplex at gmail.com
Mon Jan 5 18:09:08 GMT 2009

Hi Shibaram,

This page describes how to set JCIFS properties:


Note that jcifs.properties cannot be specified by any means other than
as a System property. That is why you are getting the error you are
seeing. So to use the JCIFS properties file, you must modify the
Tomcat command-line to include -Djcifs.properties=myproperties.prp.

There is another very good reason to a command-line option to specify
the JCIFS properties file as shown above. As described on the above
page, JCIFS properties set using jcifs.Config.setProperty *must be set
before JCIFS classes are loaded*. All JCIFS 1.x properties are static
globals. The JCIFS NTLM HTTP filter uses jcifs.Config.setProperty to
set properties supplied in the web.xml. This creates the potential for
properties to be ignored if the Servlet container were to load JCIFS
classes before it processed the <filter> section. In practice this
does not seem to occur but someone once reported having a problem that
was believed to be caused by classes being loaded before the filter
properties were processed. Therefore, the best way to guarantee that
JCIFS properties are loaded properly is to set a properties file using
a servlet container command-line option:

  java -Djcifs.properties=myproperties.prp ...

And then modify the properties from the myproperties.prp file instead.
Note that you still need to restart the container after modifying the
JCIFS properties file.


On Mon, Jan 5, 2009 at 12:24 PM, shibaram <dunumania at yahoo.co.in> wrote:
> I am trying to put all the properties in the property file "jcifs.properties"
> and configured it in the init-param  tag of the filter tag in web.xml file
> like below.
> <filter>
>    <filter-name>NtlmHttpFilter</filter-name>
>    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
>        <init-param>
>           <param-name>jcifs.properties</param-name>
>           <param-value>/WEB-INF/opt/jcifs.properties</param-value>
>        </init-param>
> </filter>
> But I my application is failing to access the properties file I think.
> Because I am getting below exceptions:
> jcifs.smb.SmbException: A domain was not specified
>        at jcifs.smb.SmbSession.getCha

Michael B Allen
PHP Active Directory SPNEGO SSO

More information about the jcifs mailing list