比如你的文件在
webapps/images/san.jpg
webapps/views/san.jsp等等
这个路径,
那么,你在jsp中可以这样访问它
String path=request.getRealPath("");
path =path+"/images/san.jpg";
out.print(path);
FileOutputStream fos_jpg = new FileOutputStream(path);
比如你的文件在
webapps/images/san.jpg
webapps/views/san.jsp等等
这个路径,
那么,你在jsp中可以这样访问它
String path=request.getRealPath("");
path =path+"/images/san.jpg";
out.print(path);
FileOutputStream fos_jpg = new FileOutputStream(path);