[jcifs] JCIFS with Windows Vista / IE 7

shibaram dunumania at yahoo.co.in
Mon Jan 5 19:07:37 GMT 2009


Thank you Mike, for your quick response.
I appreciate.

I tried setting 1st time   as  
-Djcifs.properties=/WEB-INF/opt/jcifs.properties

in the tomcat command line system proerty setup fileds. (By setting under
Java options: by editing the "Java" tab running "tomcat6w.exe"  file
existing under  <TOMCAT_HOME>/bin/  )

also for 2nd time tried setting -Djcifs.properties=jcifs.properties

where actually my properties file named "jcifs.properties"  exist under
/WEB-INF/opt/   directory.

But both times, its failed (Each time I restarted tomcat 6 server after the
settings).
I am getting same error.

Where should I put the property file exactly, any idea?

Thanks
Shibaram



Michael B Allen wrote:
> 
> Hi Shibaram,
> 
> This page describes how to set JCIFS properties:
> 
>   http://jcifs.samba.org/src/docs/api/overview-summary.html#scp
> 
> 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.
> 
> Mike
> 
> 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
> http://www.ioplex.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/JCIFS-with-Windows-Vista---IE-7-tp6057570p21297138.html
Sent from the Samba - jcifs mailing list archive at Nabble.com.



More information about the jcifs mailing list