往mysql数据库中上传路径问题
String path = System.getProperty("catalina.home");
String fileName = morningTime+"model.docx";
path = path+"\\webapps\\JAVA_STU\\office\\templateFile\\"+fileName;
path.replace("//", "\\"); //要把斜杠转义一下
FileOutputStream outStream = null;
outStream = new FileOutputStream(path);
document.write(outStream);
outStream.close();
WordData wordData = new WordData();
wordData.setFileUrl(path);
wordData.setDataTime(morningTime);
wordData.setWordName(fileName);
wordDataManager.add(wordData);