ServletContext context = getServletContext();
String path = context.getRealPath("/"); //这个能够读取到绝对路径;不要使用URL baseURL = context.getResource("/");baseURL.toURI();这个不会带上http://,而是localhost/XXX/这种方式
String userTempFileDir = path+"var/aiml/user";
System.out.println("aiml User File Path:" + userTempFileDir);
temp = File.createTempFile("user-", ".aiml", new File(userTempFileDir));