@@ -0,0 +1,1971 @@
+%0Apackage ge.mziuri.servlet;%0A%0Aimport com.sun.prism.paint.Paint;%0Aimport ge.mziuri.dao.EventDAO;%0Aimport ge.mziuri.dao.EventDAOImpl;%0Aimport ge.mziuri.enums.Category;%0Aimport ge.mziuri.enums.Type;%0Aimport ge.mziuri.model.Event;%0Aimport java.io.IOException;%0Aimport java.text.ParseException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0Aimport javax.servlet.RequestDispatcher;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A%0Apublic class EventCreateServlet extends HttpServlet %7B%0A    %0A    @Override%0A    public void doGet(HttpServletRequest request, HttpServletResponse response) %7B%0A        String name = (String)request.getAttribute(%22name%22);%0A        String description = (String)request.getAttribute(%22desc%22);%0A        String date_string = (String)request.getAttribute(%22date%22);%0A        String price = (String)request.getAttribute(%22price%22);%0A        Category category = (Category.valueOf((String)request.getAttribute(%22categ%22)));%0A        Type type = (Type.valueOf((String)request.getAttribute(%22type%22)));%0A        String places = (String)request.getAttribute(%22places%22);%0A        SimpleDateFormat formatter = new SimpleDateFormat(%22MM/dd/yyyy%22);%0A        Date date = null;%0A        try %7B%0A             date = formatter.parse(date_string);%0A        %7D%0A        catch(ParseException ex) %7B%0A            System.out.println(ex.getMessage());%0A        %7D%0A        Event event = new Event();%0A        event.setName(name);%0A        event.setDesc(description);%0A        event.setDate(date);%0A        event.setPrice(Double.parseDouble(name));%0A        event.setCategory(category);%0A        event.setType(type);%0A        event.setPlaces(Integer.parseInt(places));%0A        EventDAO eventDAO = new EventDAOImpl();%0A        eventDAO.CreateEvent(event);%0A    %7D%0A    %0A    @Override%0A    public void doPost(HttpServletRequest request, HttpServletResponse response) %7B%0A        %0A        %0A    %7D%0A%7D%0A

add EventCreateServlet