Skip to content

web-practice. Pochtalon#650

Open
pochtalon wants to merge 2 commits intomate-academy:masterfrom
pochtalon:pocht
Open

web-practice. Pochtalon#650
pochtalon wants to merge 2 commits intomate-academy:masterfrom
pochtalon:pocht

Conversation

@pochtalon
Copy link

Changed parameters for connection to db in ConnectionUtil class;
Created 3 directories in controller and views directories (car, manufacturer, driver); Added taglib dependency to pom.xml;
Created and implemented 3 controllers for working with each db; Created additional controller AddDriverToCarController; Created .jsp files for controllers;

Created 3 directories in controller and views directories (car, manufacturer, driver);
Added taglib dependency to pom.xml;
Created and implemented 3 controllers for working with each db;
Created additional controller AddDriverToCarController;
Created .jsp files for controllers;
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
Long manufacturerID = Long.valueOf(req.getParameter("id"));
manufacturerService.delete(manufacturerID);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the deletion of the manufacturer, there is no redirection or response being sent to the client. You should redirect to a confirmation or another relevant page.

Comment on lines 21 to 22
carService.delete(carID);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After deleting the car, it would be good to redirect the user to a confirmation page or back to the list of cars.

Comment on lines 39 to 40
carService.create(car);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment on lines 22 to 23
driverService.delete(driverID);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment on lines 34 to 35
driverService.create(driver);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After creating a new driver, you could redirect to the list of drivers or display a success message.

Comment on lines 35 to 36
manufacturerService.create(manufacturer);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@pochtalon pochtalon requested a review from olekskov July 15, 2023 20:15
Copy link

@Ivan95kos Ivan95kos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants