Merge remote-tracking branch 'remotes/origin/wmj' into wlf

# Conflicts:
#	src/core/process/C_StudentUploadOpeningReport.java
wlf
wlf 6 years ago
parent 82eac83462
commit 42369e5b49

@ -1,5 +1,6 @@
package servlet.Submit;
import core.process.C_StudentUploadOpeningReport;
import core.user.User;
import javax.servlet.ServletException;
@ -9,6 +10,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
@ -19,25 +21,6 @@ public class S_StudentUploadOpeningReport extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doPost(request, response);
User user=(User) request.getSession().getAttribute("user");
String student_id=user.getId();
try {
//获取上传的文件
Part part=request.getPart("file");
//获取请求的信息
String name=part.getHeader("content-disposition");
//获取上传文件的目录
String root=request.getServletContext().getRealPath("/upload");
request.setAttribute("info", "上传文件成功");
} catch (Exception e) {
e.printStackTrace();
request.setAttribute("info", "上传文件失败");
}
request.getRequestDispatcher("/upload.jsp").forward(request, response);
}
}

Loading…
Cancel
Save