package servlet;

import core.process.C_MentorFillOpeningReportOpinion;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@WebServlet("/home/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");
        Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
        C_MentorFillOpeningReportOpinion p = new C_MentorFillOpeningReportOpinion();
        p.setGraduationDesignId(id);
        p.setVMap(vMap);
        try {
            p.fillInformation();
        } catch (Exception e) {
            e.printStackTrace();
            response.sendRedirect("/op_fail.jsp");
        }
    }
    static String[] vName = {
            "mentor_opinion"
    };
}