You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
929 B
27 lines
929 B
package servlet;
|
|
|
|
import javax.servlet.ServletException;
|
|
import javax.servlet.annotation.MultipartConfig;
|
|
import javax.servlet.annotation.WebServlet;
|
|
import javax.servlet.http.HttpServlet;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
|
|
@WebServlet("/home/student-upload-finished-product")
|
|
@MultipartConfig
|
|
public class S_StudentUploadFinishedProduct extends HttpServlet {
|
|
static String fileType = "graduation_design_finished_product";
|
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
|
String id = request.getParameter("id");
|
|
String fileURL;
|
|
try {
|
|
fileURL = servlet.Utils.saveFile(request, fileType);
|
|
}catch (Exception e)
|
|
{
|
|
System.out.print(e);
|
|
response.sendRedirect("/op_fail.jsp");
|
|
}
|
|
}
|
|
}
|