Skip to content

added controllers & appropriate jsp pages#663

Open
TemkaHillfinger wants to merge 4 commits intomate-academy:masterfrom
TemkaHillfinger:hw-web-practice
Open

added controllers & appropriate jsp pages#663
TemkaHillfinger wants to merge 4 commits intomate-academy:masterfrom
TemkaHillfinger:hw-web-practice

Conversation

@TemkaHillfinger
Copy link

No description provided.

Car car = carService.get(carId);
Driver driver = driverService.get(driverId);
carService.addDriverToCar(driver, car);

Copy link

Choose a reason for hiding this comment

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

add redirect to the page where you can see the change just made (all cars after adding a car etc)

@TemkaHillfinger TemkaHillfinger requested a review from okuzan August 8, 2023 07:36
car.setModel(req.getParameter("model"));
car.setManufacturer(manufacturerService.get(manufacturerId));
car.setDrivers(new ArrayList<>());
carService.create(car);
Copy link

Choose a reason for hiding this comment

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

Same as Oleh commented before. After all doPost method we should redirect user to page where he may see result of his request (list of all cars, drivers etc) otherwise he will struggle to understand if his request is successful.
Please recheck all controllers for same issue

Copy link

@olekskov olekskov left a comment

Choose a reason for hiding this comment

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

Good 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