@Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        String action = request.getParameter("act");
        if(action != null) {
            try {
                RequestContext context = new RequestContext(request);
                if(context.isLogged()) {
                    int projId = Utilities.chooseParam(request, "id", 0);
                    int compId = Utilities.chooseParam(request, "compid", 0);
                    int specId = Utilities.chooseParam(request, "projtype", 0);
                    String name = Utilities.chooseParam(request, "projname", "");
                    
                    switch(action) {
                        case "create":
                            createProject(compId, name, specId, response, context);
                            break;
                        case "rename":
                            renameProject(projId, name, response, context);
                            break;
                        case "close":
                            closeProject(projId, response, context);
                            break;
                        default:
                            response.sendRedirect("projects.jsp");
                    }
                } else {
                    response.sendRedirect("login.jsp");
                }
            } catch(SQLException e) {
                log.error("SQLException caught in Project servlet.", e);
                response.sendRedirect("error.jsp?err=dberr");
            }
        } else {
            response.sendRedirect("home.jsp");
        }
    }