diff --git a/src/core/process/Process.java b/src/core/process/Process.java index 91c5d63..be06a88 100644 --- a/src/core/process/Process.java +++ b/src/core/process/Process.java @@ -4,14 +4,17 @@ import core.operation.Operation; public abstract class Process{ + private static String buttonName; + protected static String targetURL; + + protected static String iconURL; + private String status; private String permission; private Operation operation; private String info; - private static String buttonName; - protected static String targetURL; - protected static String iconURL; + protected abstract boolean check(); public String getPermission() { diff --git a/src/servlet/S_CollegeFillOpeningReportOpinion.java b/src/servlet/S_CollegeFillOpeningReportOpinion.java index f84de95..c7f7367 100644 --- a/src/servlet/S_CollegeFillOpeningReportOpinion.java +++ b/src/servlet/S_CollegeFillOpeningReportOpinion.java @@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("college-fill-opening-report-opinion") +@WebServlet("/college-fill-opening-report-opinion") public class S_CollegeFillOpeningReportOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_CollegeFillScoreOpinion.java b/src/servlet/S_CollegeFillScoreOpinion.java index b66ec58..360e082 100644 --- a/src/servlet/S_CollegeFillScoreOpinion.java +++ b/src/servlet/S_CollegeFillScoreOpinion.java @@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("college-fill-score-opinion") +@WebServlet("/college-fill-score-opinion") public class S_CollegeFillScoreOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_MentorFillOpeningReportOpinion.java b/src/servlet/S_MentorFillOpeningReportOpinion.java index 588215b..d35293a 100644 --- a/src/servlet/S_MentorFillOpeningReportOpinion.java +++ b/src/servlet/S_MentorFillOpeningReportOpinion.java @@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("mentor-fill-opening-report-opinion") +@WebServlet("/mentor-fill-opening-report-opinion") public class S_MentorFillOpeningReportOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_MentorFillReview.java b/src/servlet/S_MentorFillReview.java index 1ece272..a10cf5c 100644 --- a/src/servlet/S_MentorFillReview.java +++ b/src/servlet/S_MentorFillReview.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("mentor-fill-review") +@WebServlet("/mentor-fill-review") public class S_MentorFillReview extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_ReviewerFillReview.java b/src/servlet/S_ReviewerFillReview.java index f950771..f3c754d 100644 --- a/src/servlet/S_ReviewerFillReview.java +++ b/src/servlet/S_ReviewerFillReview.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("reviewer-fill-review") +@WebServlet("/reviewer-fill-review") public class S_ReviewerFillReview extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_SchoolFillScoreOpinion.java b/src/servlet/S_SchoolFillScoreOpinion.java index d6b0e9d..fa1fa02 100644 --- a/src/servlet/S_SchoolFillScoreOpinion.java +++ b/src/servlet/S_SchoolFillScoreOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("school-fill-score-opinion") +@WebServlet("/school-fill-score-opinion") public class S_SchoolFillScoreOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_SecretaryFillOpeningReportRecord.java b/src/servlet/S_SecretaryFillOpeningReportRecord.java index 2ef4f62..94f5ee1 100644 --- a/src/servlet/S_SecretaryFillOpeningReportRecord.java +++ b/src/servlet/S_SecretaryFillOpeningReportRecord.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("secretary-fill-opening-report-record") +@WebServlet("/secretary-fill-opening-report-record") public class S_SecretaryFillOpeningReportRecord extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_SecretaryFillReplyRecord.java b/src/servlet/S_SecretaryFillReplyRecord.java index 90a10fa..9efee5e 100644 --- a/src/servlet/S_SecretaryFillReplyRecord.java +++ b/src/servlet/S_SecretaryFillReplyRecord.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("secretary-fill-reply-record") +@WebServlet("/secretary-fill-reply-record") public class S_SecretaryFillReplyRecord extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_StudentUploadFinishedProduct.java b/src/servlet/S_StudentUploadFinishedProduct.java index 20f2fb5..b7271e4 100644 --- a/src/servlet/S_StudentUploadFinishedProduct.java +++ b/src/servlet/S_StudentUploadFinishedProduct.java @@ -14,7 +14,16 @@ 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 = "000"; - //String id = request.getParameter("id"); - String fileURL = servlet.Utils.saveFile(request, fileType); + //String files = request.getParameter("file"); + System.out.print("123"); + System.out.print( request.getPart("file")); + System.out.print("123"); + try { + String fileURL = servlet.Utils.saveFile(request, fileType); + }catch (Exception e) + { + System.out.print(e); + } + System.out.print("222"); } } diff --git a/src/servlet/S_StudentUploadOpeningReport.java b/src/servlet/S_StudentUploadOpeningReport.java index 4102e91..ffb5f9c 100644 --- a/src/servlet/S_StudentUploadOpeningReport.java +++ b/src/servlet/S_StudentUploadOpeningReport.java @@ -18,6 +18,6 @@ public class S_StudentUploadOpeningReport extends HttpServlet { static String fileType = "graduation_design_opening_report"; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); - String fileURL = servlet.Utils.saveFile(request, fileType); + //String fileURL = servlet.Utils.saveFile(request, fileType); } } diff --git a/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java b/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java index c43e7fd..2e35294 100644 --- a/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java +++ b/src/servlet/S_TeacherTeamFillOpeningReportOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("teacher-team-fill-opening-report-opinion") +@WebServlet("/teacher-team-fill-opening-report-opinion") public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/S_TeacherTeamFillScoreOpinion.java b/src/servlet/S_TeacherTeamFillScoreOpinion.java index a82b234..3a70590 100644 --- a/src/servlet/S_TeacherTeamFillScoreOpinion.java +++ b/src/servlet/S_TeacherTeamFillScoreOpinion.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; -@WebServlet("teacher-team-fill-score-opinion") +@WebServlet("/teacher-team-fill-score-opinion") public class S_TeacherTeamFillScoreOpinion extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); diff --git a/src/servlet/Utils.java b/src/servlet/Utils.java index 3cea1d0..0a7f8fb 100644 --- a/src/servlet/Utils.java +++ b/src/servlet/Utils.java @@ -39,10 +39,13 @@ public interface Utils { return getFilePath(table)+getFileName(fileName); } static String saveFile(HttpServletRequest request, String table) throws IOException, ServletException { - Part part = request.getPart("graduation_design"); + System.out.println("utils"); + Part part = request.getPart("file"); + System.out.println("part"); String header = part.getHeader("content-disposition"); String path = header.substring(header.indexOf("filename=") + 10, header.length() - 1); String filePathName = servlet.Utils.getFilePathName(table,path); + System.out.println(filePathName); File file = new File(filePathName); InputStream inputStream = part.getInputStream(); FileOutputStream outputStream = new FileOutputStream(file); @@ -54,6 +57,7 @@ public interface Utils { outputStream.close(); inputStream.close(); part.delete(); + System.out.println("end"); return filePathName; } } diff --git a/src/servlet/account/S_Login.java b/src/servlet/account/S_Login.java index f7b9506..cee72a3 100644 --- a/src/servlet/account/S_Login.java +++ b/src/servlet/account/S_Login.java @@ -38,7 +38,7 @@ public class S_Login extends HttpServlet { return; } request.getSession().setAttribute("user",user); - response.sendRedirect("/home.jsp"); + response.sendRedirect("/home/home.jsp"); return; } } \ No newline at end of file diff --git a/src/servlet/account/S_Register.java b/src/servlet/account/S_Register.java index 1791000..028b4ac 100644 --- a/src/servlet/account/S_Register.java +++ b/src/servlet/account/S_Register.java @@ -43,7 +43,7 @@ public class S_Register extends HttpServlet { response.sendRedirect("/op_fail.jsp"); } request.getSession().setAttribute("user",user); - response.sendRedirect("/home.jsp"); + response.sendRedirect("/home/home.jsp"); return; } } \ No newline at end of file diff --git a/web/cssFile/images/opt.sai2 b/web/cssFile/images/opt.sai2 index 9a62cbd..e69de29 100644 Binary files a/web/cssFile/images/opt.sai2 and b/web/cssFile/images/opt.sai2 differ diff --git a/web/cssFile/images/search1.sai2 b/web/cssFile/images/search1.sai2 index 648da7a..e69de29 100644 Binary files a/web/cssFile/images/search1.sai2 and b/web/cssFile/images/search1.sai2 differ diff --git a/web/cssFile/images/search2.sai2 b/web/cssFile/images/search2.sai2 index 6ba357a..e69de29 100644 Binary files a/web/cssFile/images/search2.sai2 and b/web/cssFile/images/search2.sai2 differ diff --git a/web/download.jsp b/web/home/download.jsp similarity index 85% rename from web/download.jsp rename to web/home/download.jsp index bc2d5c9..37a54c4 100644 --- a/web/download.jsp +++ b/web/home/download.jsp @@ -9,8 +9,8 @@