It was actually much simpler than that :) Wen deployed as war the application is exploded in to the windows temp folder that has spaces and getResource() returns URLEncoded url so before using it in file it needs to be URL decoded.
Your code worked just fine as well, thank you! ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1308154