1)方式一
URI webPathTemp = Thread.currentThread().getContextClassLoader().getResource("").toURI();
String webPath=String.valueOf(webPathTemp.getPath());
webPath = webPath.substring(1,webPath.indexOf("WEB-INF"))+"out/zxjl";
String templateFile=webPath+"/zxjl.dot";
2)方式二
String webPath = JSPUtil.class.getResource("").getPath();
String xmlFile = webPath.substring(1,webPath.indexOf("WEB-INF"))+"out\\UpDownData.xml";