Commit 8b9fef83 by Patryk Czarnik

override w klasach itp

parent 5c9b22e0
......@@ -34,7 +34,7 @@ public class DoUploadPhoto extends HttpServlet {
// wypisujemy błąd, ale metoda kończy się normalnie
e.printStackTrace();
}
response.sendRedirect("products7.jsp");
response.sendRedirect("products9.jsp");
}
}
......@@ -20,6 +20,7 @@ import sklep.model.Product;
public class EditProduct extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String parametrId = request.getParameter("productId");
if(parametrId != null) {
......@@ -49,6 +50,7 @@ public class EditProduct extends HttpServlet {
dispatcher.forward(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// W tej wersji nie obsługujemy błędów - w razie błędu wyświetli się strona z wyjątkiem
// W przypadku braku ID zostanie utworzony nowy produkt, a w przypadku podania ID (gdy to była edycja istniejącego) - zostanie zastąpiony.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment