On Mar 7, 2008, at 5:12 PM, cleverpig wrote:
public Restlet createRoot(){
final String
DIR_ROOT_URI="file:///E:/eclipse3.1RC3/workspace/RestletPractice/static_files/
";
Yes, I already know how to do the code. That's not my question. The
differences between your example and mine are:
+ Yours has "file:///" whereas mine has "file:/"
+ Yours has no spaces encoded as %20.
I hacked my code and made it use "file:///" and it made no
difference. After some more experimentation, it seems the problem is
the %20 characters. To make a simpler test-case, I used a path like:
C:\tmp\sub_directory
When converted via File.toURI().toString(), I get:
file:/C:/tmp/sub_directory
and that works. When I rename sub_directory so it has a space instead:
C:\tmp\sub directory
I get:
file:/C:/tmp/sub%20directory
And this causes Restlet not to work. It seems like a bug to me.
- Paul