Eclipse 在我的 UNIX 机器上出现内存不足异常,具有 jdk 1.6。同时尝试多次运行我的 Web 应用程序而不终止我的本地应用程序服务器。然后通过 vm 参数增加我的堆空间,并尝试更改 Eclipse.ini。但是没有用。
google了一段时间,才知道这是webapp classLoader多次部署的问题。我无法找到解决这个问题的方法。请给出一个解决方案来克服这个问题。
我发现使用FileCleaner ( FileCleaningTracker ) 来避免在 LogoutServlet 中进行多次部署和编写代码。
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
req.getSession().invalidate();
FileCleaner.getInstance().exitWhenFinished();
resp.sendRedirect("/index");
}
但它不起作用。
提前致谢 。