Open
Conversation
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;
olekskov
suggested changes
Jul 15, 2023
| protected void doGet(HttpServletRequest req, HttpServletResponse resp) | ||
| throws ServletException, IOException { | ||
| Long manufacturerID = Long.valueOf(req.getParameter("id")); | ||
| manufacturerService.delete(manufacturerID); |
There was a problem hiding this comment.
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); | ||
| } |
There was a problem hiding this comment.
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); | ||
| } |
Comment on lines
22
to
23
| driverService.delete(driverID); | ||
| } |
Comment on lines
34
to
35
| driverService.create(driver); | ||
| } |
There was a problem hiding this comment.
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); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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;