Seems to me Tomcat returns a HTML page instead of the XML the client lib expects. The reason is the URL as it does not map to the Slide context. Should rather look like http://localhost:8080/slide/ I guess.

Oliver

Jimmy Yu wrote:

Hi,

I have this very simple program code...
import org.apache.commons.httpclient.*;
import org.apache.webdav.lib.*;

public class SlideTest
{
   public static void main(String args[])
   {
      try
      {
         HttpURL hrl = new HttpURL("http://localhost:8080/";);
         WebdavResource wdr;
         wdr = new WebdavResource(hrl);
         System.out.println("End of Test");
      }
      catch(Exception ie)
      {
         ie.printStackTrace();
         System.out.println("Cause " + ie.getCause());
      }
   }
}
and when i try to run this code, i always get this error --

[Fatal Error] :1:3: The markup in the document preceding the root element must be 
well-formed.
java.lang.NullPointerException
        at 
org.apache.webdav.lib.methods.XMLResponseMethodBase.initResponseHashtable(XMLResponseMethodBase.java:333)
        at 
org.apache.webdav.lib.methods.XMLResponseMethodBase.getResponseHashtable(XMLResponseMethodBase.java:306)
        at 
org.apache.webdav.lib.methods.XMLResponseMethodBase.getResponses(XMLResponseMethodBase.java:141)
        at 
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3191)
        at 
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3145)
        at org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:879)
        at 
org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:824)
        at org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1746)
        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 SlideTest.main(SlideTest.java:15)
Cause null

can anyone point me in the right direction?

Thanks
-- Jimmy


--------------------------------------------------------------------- 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]



Reply via email to