I wrote servlet that writes an image to the root directory of my app and then delivers it to client when it gets GET request. Everything works fine when i test it in Eclipse with jetty (came with GWT plugin). But when i move it to Tomcat, i get filenotfound exception (because image is not written at all so it can't be returned to client). Is this problem with permissions for writing files?
I added this to catalina.policy file, but it's not helping either (webui is folder of my application):
grant {
permission java.io.FilePermission "${catalina.home}/webapps/webui/","read,write,delete";
permission java.io.FilePermission "${catalina.home}/webapps/webui/*","read,write,delete";
};