//----------------------获取/WEB-INF/conf/MakePrepare.txt 配置文件里的信息---------------------
String path = getClass().getClassLoader().getResource("").getPath();
path = path.replace("classes", "conf");
try {
path = java.net.URLDecoder.decode(path,"utf-8");
}
catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String papertype = DoProperties.getProperties("papertype", path+"MakePrepare.txt");
或
String path = this.getClass().getResource("/").getPath();