https://issues.apache.org/bugzilla/show_bug.cgi?id=57019
Mark Thomas <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Mark Thomas <[email protected]> --- You are correct that the caching is what is getting in the way. The getRealPath() call you use to construct the path to write to triggers a lookup. The result that the file does not exist is then cached. Disabling the cache will fix your issue. The problem you are seeing is because you are trying to do this using Tomcat 7 configuration settings rather than Tomcat 8 configuration. You need to read the migration guide: http://tomcat.apache.org/migration-8.html#Web_application_resources I also have a couple of suggestions. 1. Leave caching enabled, use getRealPath("/") and the append the file name to the result. That way you get to keep the benefit of the cache. 2. HttpServletRequest.getSession().getServletContext() is longer winded than it needs to be. You could use HttpServletRequest.getServletContext() as of Servlet 3.0 (Tomcat 7). -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
