Embedded Jetty WebAppContext FilePermission issue
问题 I need to limit file permissions for "plug-in" WAR files containing servlets in an embedded Jetty. To test the file permissions, I created a WAR containing this servlet that tries to write to a file outside of the webapps folder: public class Test extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { FileWriter outFile = new FileWriter("C:\\temp\\test.txt"); PrintWriter out = new PrintWriter(outFile);