You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Roar Skullestad <ro...@skullestad.com> on 2004/10/22 20:12:35 UTC
WebdavResource.listWebdavResources throws UnknownHostException
To build a directory tree, I am using the following recursive method:
private TreeNode getSubTree(WebdavResource resource) throws
IOException, HttpException{
TreeNode node = new TreeNode(resource.getDisplayName());
WebdavResource[] resources = resource.listWebdavResources();
for (int i = 0; i<resources.length; i++){
if (resources[i].isCollection()){
node.addTreeNode(getSubTree(resources[i]));
}
}
return node;
}
This works fine for the root node, but on the first collection node on the
level below (first recursive call), the listWebdavResources() method
throws a java.net.UnknownHostException. I also tried getChildResources(),
but same result. Any ideas?
/Roar
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org