 >                 + req.toString();
 > 
 >         if (fResLocks.lock(path, lockOwner, false, 0)) {
-672,682c694,706
+672,682c711,723
 < 						if (resourceLength > 0) {
 < 							if (resourceLength <= Integer.MAX_VALUE) {
 < 								resp.setContentLength((int) resourceLength);

>                         resp.setContentLength((int) fStore
>                                 .getResourceLength(path));
>                     }
Index: src/main/webapp/WEB-INF/web.xml
===================================================================
RCS file: /cvsroot/webdav-servlet/webdav-servlet/src/main/webapp/WEB-INF/web.xml,v

RCS file: /cvsroot/webdav-servlet/webdav-servlet/src/main/java/net/sf/webdav/LocalFileSystemStorage.java,v
retrieving revision 1.4
diff -r1.4 LocalFileSystemStorage.java
71c71,86
< 			root = new File(rootPath);
---
>             if (rootPath.equals("*WAR-FILE-ROOT*")) {
>                 String file = LocalFileSystemStorage.class.getProtectionDomain().getCodeSource().getLocation().getFile().replace('\\','/');
>                 if (file.charAt(0) == '/' && System.getProperty("os.name").indexOf("Windows") != -1) {
>                     file = file.substring(1, file.length());
>                 }
> 
>                 int ix = file.indexOf("/WEB-INF/");
>                 if (ix != -1) {
>                     rootPath = file.substring(0, ix).replace('/', File.separatorChar);
>                 } else {
>                     throw new WebdavException("Could not determine root of war file. Can't extract from path '"
>                             + file + "' for this web container");                    
