我用的是tomcat服务器,有一个类xml,用来创建xml文件,并写文件,创建文件的方法如下,我的参数_path应该是什么啊,总是建不了,我要在struts action里new一个xml类,然后执行方法。各位大侠帮帮忙
public boolean createFile(String _path,String _fileName)throws IOException {
boolean success = false;
String fileName = _fileName;
String filePath = _path;
try {
File file = new File(filePath);
if (!file.isDirectory()){
file.mkdirs();
}
public boolean createFile(String _path,String _fileName)throws IOException {
boolean success = false;
String fileName = _fileName;
String filePath = _path;
try {
File file = new File(filePath);
if (!file.isDirectory()){
file.mkdirs();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货