ServletContext Properties 操作文件
摘要: FileOutputStream fos = null;
try {
new File(sc.getRealPath("WEB-INF") + "/" + optionsFilename).delete();
fos = new FileOutputStream(sc.getRealPath("WEB-INF") +
"/" + optionsFilename);
props.store(fos, null);
fos.flush();
result = "Options have been saved.";
} catch (IOException e) {
log.error("Error saving contact:");
阅读全文
posted @
2010-03-09 22:19 Ke 阅读(496) |
评论 (0) 编辑