I'm afraid adding a '/' didn't work :-( /Tobias
-----Original Message----- From: Ritu Kedia [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 11:18 To: 'Slide Users Mailing List' Subject: RE: can't set up the simplest possible example due to: followRedirects is disabled problem Just a wild guess... try a "/" at the end of your URL. See if it works. In other words.. try: http://oden/exchange/tobias/Notes/ The trailing / solved a similar follow redirects problem on WebSphere for me. Regards, Ritu -----Original Message----- From: Tobias Eriksson [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 12:18 PM To: Slide Users Mailing List Subject: can't set up the simplest possible example due to: followRedirects is disabled problem Hi I trying my first example ever with SLIDE and doesn't seem to get it right. I get a "followRedirects is disabled" response, but have absolutely no idea why. So any help would be appreciated. My aim is to access MS Exchange server so that I can update the public folder for example. And of course if you have a better alternative to accessing MS Exchange, then I'm more than happy to listen to any suggestions. I have only found the Compoze-library which costs a lot of money, and then SLIDE which I'm trying to use now. The source code is as follows: package com.tobias.webdav; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpURL; import org.apache.webdav.lib.WebdavResource; /** * @author tobias * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class WebDAVTest { public static void main (String args[]) { try { HttpURL hrl = new HttpURL("http://oden/exchange/tobias/Notes"); hrl.setUserinfo("tobias","lindae77"); WebdavResource wdr = new WebdavResource(hrl); File fn = new File("remote-file"); String arr[] = wdr.list(); int i=arr.length; while( --i >= 0 ) { System.out.println( "["+i+"] "+arr[ i ] ); } wdr.close(); } catch(MalformedURLException mue) { System.out.println( "exception "+mue ); mue.printStackTrace(); } catch(HttpException he) { System.out.println( "exception; "+he ); he.printStackTrace(); } catch(IOException ioe) { System.out.println( "exception; "+ioe ); ioe.printStackTrace(); } } } Output when I run the program above: Sep 20, 2004 2:19:51 PM org.apache.commons.httpclient.HttpMethodBase processRedirectResponse INFO: Redirect requested but followRedirects is disabled exception; org.apache.commons.httpclient.HttpException org.apache.commons.httpclient.HttpException at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java: 3185) at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java: 3145) at org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:87 9) at org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.j ava:824) at org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1 746) at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1156 ) at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1175 ) at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1261 ) at org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:274) at com.tobias.webdav.WebDAVTest.main(WebDAVTest.java:32) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
