0
이 URL의 코드는 http://afewdoubts.blogspot.com/2013/03/upload-fileimage-in-folder-using-servlet.html이지만 이미지를 지정된 경로에 저장하는 대신 NetBeans 임시 폴더 C:\Users\user\AppData\Roaming\NetBeans\8.1\config\GF_4.1.1\domain1\generated\jsp\WebApplication
에 저장합니다.이미지를 업로드하고 JSP/Servlet을 사용하여 폴더에 저장
은 Heres는 코드 나는 당신의 도움이 감사
PrintWriter out = response.getWriter();
classclass c=new classclass();
String savePath = File.separator + SAVE_DIR;
File fileSaveDir=new File(savePath);
String firstName=request.getParameter("firstname");
String lastName=request.getParameter("lastname");
Part part=request.getPart("file");
String fileName=extractFileName(part);
/*if you may have more than one files with same name then you can calculate some random characters and append that characters in fileName so that it will make your each image name identical.*/
part.write(savePath + File.separator + fileName);
편집을 시도했습니다. 감사합니다