public class UPloadPath {
public static String attach_path ="resources/uploads/";
public static String path(HttpServletRequest request){
String uploadPath ="";
try{
String root_path =request.getServletContext().getRealPath("/");
uploadPath =root_path+attach_path.replace('/', File.separatorChar);
}catch(Exception e){
e.printStackTrace();
}
return uploadPath;
}
}
-> 출력
C:\dev\macaronics-spring-two\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\web\resources\uploads\
댓글 ( 4)
댓글 남기기