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";

相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-05-23
  • 2022-12-23
  • 2021-08-19
相关资源
相似解决方案