Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
thats a really old post, but i ran into the same problem and want to share my solution.
User often choose weird filenames, thats why i want to handle it this way.
It seems that the encode methode is not really designed to encode a URL in the way we need it here for WebDAV.
For example, a space in filename will be encoded to "+" instead of "%20". I searched a lot and at the end i give up and use a little workaround.
Important thing: Don't encode the entire URL, in my case i encode the filename only and it works.
globalMap.put("URI",java.net.URLEncoder.encode(((String)globalMap.get("Filename")),"UTF-8").replace("+", "%20"))
regards
Lars