| 1 | package control; | |
| 2 | ||
| 3 | import model.maglietta.MagliettaDAO; | |
| 4 | ||
| 5 | import javax.servlet.ServletException; | |
| 6 | import javax.servlet.annotation.WebServlet; | |
| 7 | import javax.servlet.http.HttpServlet; | |
| 8 | import javax.servlet.http.HttpServletRequest; | |
| 9 | import javax.servlet.http.HttpServletResponse; | |
| 10 | import java.io.IOException; | |
| 11 | import java.sql.SQLException; | |
| 12 | ||
| 13 | @WebServlet("/Tipo") | |
| 14 | public class Tipo extends HttpServlet { | |
| 15 | @Override | |
| 16 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { | |
| 17 | MagliettaDAO magliettaDAO = new MagliettaDAO(); | |
| 18 | ||
| 19 | try { | |
| 20 |
1
1. doGet : removed call to javax/servlet/http/HttpServletRequest::setAttribute → KILLED |
req.setAttribute("maglietteTipo", magliettaDAO.doRetrieveByTipo(req.getParameter("tipo"))); |
| 21 | } catch (SQLException e) { | |
| 22 |
1
1. doGet : removed call to javax/servlet/RequestDispatcher::forward → KILLED |
req.getRequestDispatcher("/pages/errorpage.jsp").forward(req, resp); |
| 23 | } | |
| 24 | ||
| 25 |
1
1. doGet : removed call to javax/servlet/RequestDispatcher::forward → KILLED |
req.getRequestDispatcher("magliettaTipo.jsp").forward(req, resp); |
| 26 | } | |
| 27 | ||
| 28 | @Override | |
| 29 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | |
| 30 |
1
1. doPost : removed call to control/Tipo::doGet → KILLED |
doGet(req, resp); |
| 31 | } | |
| 32 | } | |
Mutations | ||
| 20 |
1.1 |
|
| 22 |
1.1 |
|
| 25 |
1.1 |
|
| 30 |
1.1 |