Implemented using java8 tomcat7 seasar2
Since there was a Util to get the Servlet in sastruts, use
ServletContext context = ServletContextUtil.getServletContext(); String path = context.getRealPath("WEB-INF/classes/xxx.txt"); File file = new File(path);
There may be few usage scenes, but a memorandum
Recommended Posts