<%@ page import="java.sql.* " %>
<%@ page import="java.io.* " %> Properties pro = new Properties();
String realPath = request.getSession().getServletContext().getRealPath("/");
try{
FileInputStream file = new FileInputStream(realPath+"erpaddresslist.properties");
pro.load(file);
}catch(FileNotFoundException e){
e.printStackTrace();
}catch(IOException e){
e.printStackTrace();
}这样写不行呢 在页面上面看到的就是 null ,结果在FileInputStream file = new FileInputStream(realPath+"erpaddresslist.properties");
后面加了个 out.println("========="+file);
结果就是不显示在桌面上,看来是这里报错了 为什么啊?
<%@ page import="java.io.* " %> Properties pro = new Properties();
String realPath = request.getSession().getServletContext().getRealPath("/");
try{
FileInputStream file = new FileInputStream(realPath+"erpaddresslist.properties");
pro.load(file);
}catch(FileNotFoundException e){
e.printStackTrace();
}catch(IOException e){
e.printStackTrace();
}这样写不行呢 在页面上面看到的就是 null ,结果在FileInputStream file = new FileInputStream(realPath+"erpaddresslist.properties");
后面加了个 out.println("========="+file);
结果就是不显示在桌面上,看来是这里报错了 为什么啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货