diff --git a/src/main/java/taxi/controller/LoginController.java b/src/main/java/taxi/controller/LoginController.java new file mode 100644 index 000000000..f84bcb9eb --- /dev/null +++ b/src/main/java/taxi/controller/LoginController.java @@ -0,0 +1,40 @@ +package taxi.controller; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import taxi.exception.AuthenticationException; +import taxi.lib.Injector; +import taxi.model.Driver; +import taxi.service.AuthenticationService; + +public class LoginController extends HttpServlet { + private static final Injector injector = Injector.getInstance("taxi"); + private final AuthenticationService authenticationService = + (AuthenticationService) injector.getInstance(AuthenticationService.class); + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + req.getRequestDispatcher("/WEB-INF/views/login.jsp").forward(req, resp); + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + String login = req.getParameter("login"); + String password = req.getParameter("password"); + try { + Driver driver = authenticationService.login(login, password); + HttpSession session = req.getSession(); + session.setAttribute("driver_id", driver.getId()); + resp.sendRedirect(req.getContextPath() + "/index"); + } catch (AuthenticationException e) { + req.setAttribute("errorMsg", e.getMessage()); + req.getRequestDispatcher("/WEB-INF/views/login.jsp").forward(req, resp); + } + } +} diff --git a/src/main/java/taxi/controller/LogoutController.java b/src/main/java/taxi/controller/LogoutController.java new file mode 100644 index 000000000..fada2583b --- /dev/null +++ b/src/main/java/taxi/controller/LogoutController.java @@ -0,0 +1,17 @@ +package taxi.controller; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class LogoutController extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + req.getSession().invalidate(); + resp.sendRedirect(req.getContextPath() + "/index"); + } +} diff --git a/src/main/java/taxi/controller/car/AddDriverToCarController.java b/src/main/java/taxi/controller/car/AddDriverToCarController.java index 9b2aa76ca..18724f33f 100644 --- a/src/main/java/taxi/controller/car/AddDriverToCarController.java +++ b/src/main/java/taxi/controller/car/AddDriverToCarController.java @@ -1,10 +1,12 @@ package taxi.controller.car; import java.io.IOException; +import java.util.NoSuchElementException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import taxi.exception.DataProcessingException; import taxi.lib.Injector; import taxi.model.Car; import taxi.model.Driver; @@ -24,12 +26,19 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) } @Override - public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { + public void doPost(HttpServletRequest req, HttpServletResponse resp) + throws IOException, ServletException { long driverId = Long.parseLong(req.getParameter("driver_id")); long carId = Long.parseLong(req.getParameter("car_id")); - Driver driver = driverService.get(driverId); - Car car = carService.get(carId); - carService.addDriverToCar(driver, car); - resp.sendRedirect(req.getContextPath() + "/cars/drivers/add"); + try { + Driver driver = driverService.get(driverId); + Car car = carService.get(carId); + carService.addDriverToCar(driver, car); + resp.sendRedirect(req.getContextPath() + "/cars/drivers/add"); + } catch (NoSuchElementException | DataProcessingException e) { + req.setAttribute("errorMsg", "Can't not add driver ID=" + driverId + + " to car ID=" + carId); + req.getRequestDispatcher("/WEB-INF/views/cars/drivers/add.jsp").forward(req, resp); + } } } diff --git a/src/main/java/taxi/controller/car/GetMyCurrentCarsController.java b/src/main/java/taxi/controller/car/GetMyCurrentCarsController.java new file mode 100644 index 000000000..5ffbf38f9 --- /dev/null +++ b/src/main/java/taxi/controller/car/GetMyCurrentCarsController.java @@ -0,0 +1,27 @@ +package taxi.controller.car; + +import java.io.IOException; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import taxi.lib.Injector; +import taxi.model.Car; +import taxi.service.CarService; + +public class GetMyCurrentCarsController extends HttpServlet { + private static final Injector injector = Injector.getInstance("taxi"); + private final CarService carService = (CarService) injector.getInstance(CarService.class); + + @Override + public void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + HttpSession session = req.getSession(); + Long driverId = (Long) session.getAttribute("driver_id"); + List cars = carService.getAllByDriver(driverId); + req.setAttribute("cars", cars); + req.getRequestDispatcher("/WEB-INF/views/cars/drivers/current.jsp").forward(req, resp); + } +} diff --git a/src/main/java/taxi/controller/driver/AddDriverController.java b/src/main/java/taxi/controller/driver/AddDriverController.java index 1db67730b..e6da4dd22 100644 --- a/src/main/java/taxi/controller/driver/AddDriverController.java +++ b/src/main/java/taxi/controller/driver/AddDriverController.java @@ -24,7 +24,9 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { String name = req.getParameter("name"); String licenseNumber = req.getParameter("license_number"); - Driver driver = new Driver(name, licenseNumber); + String login = req.getParameter("login"); + String password = req.getParameter("password"); + Driver driver = new Driver(name, licenseNumber, login, password); driverService.create(driver); resp.sendRedirect(req.getContextPath() + "/drivers/add"); } diff --git a/src/main/java/taxi/dao/CarDaoImpl.java b/src/main/java/taxi/dao/CarDaoImpl.java index 586ccb595..db179ec51 100644 --- a/src/main/java/taxi/dao/CarDaoImpl.java +++ b/src/main/java/taxi/dao/CarDaoImpl.java @@ -116,8 +116,8 @@ public boolean delete(Long id) { String query = "UPDATE cars SET is_deleted = TRUE WHERE id = ?" + " AND is_deleted = FALSE"; try (Connection connection = ConnectionUtil.getConnection(); - PreparedStatement statement = - connection.prepareStatement(query)) { + PreparedStatement statement = + connection.prepareStatement(query)) { statement.setLong(1, id); return statement.executeUpdate() > 0; } catch (SQLException e) { @@ -149,7 +149,7 @@ public List getAllByDriver(Long driverId) { } } catch (SQLException e) { throw new DataProcessingException("Can't get all cars for driver with id: " - + driverId, e); + + driverId, e); } cars.forEach(car -> car.setDrivers(getAllDriversByCarId(car.getId()))); return cars; @@ -183,7 +183,7 @@ private void deleteAllDrivers(Car car) { statement.executeUpdate(); } catch (SQLException e) { throw new DataProcessingException("Can't delete drivers " + car.getDrivers() - + " of car with id: " + car.getId(), e); + + " of car with id: " + car.getId(), e); } } @@ -193,8 +193,8 @@ private List getAllDriversByCarId(Long carId) { + "JOIN drivers d ON cd.driver_id = d.id " + "WHERE car_id = ? AND is_deleted = false"; try (Connection connection = ConnectionUtil.getConnection(); - PreparedStatement statement = - connection.prepareStatement(query)) { + PreparedStatement statement = + connection.prepareStatement(query)) { statement.setLong(1, carId); ResultSet resultSet = statement.executeQuery(); List drivers = new ArrayList<>(); diff --git a/src/main/java/taxi/dao/DriverDao.java b/src/main/java/taxi/dao/DriverDao.java index 83440d530..e9c38d2a5 100644 --- a/src/main/java/taxi/dao/DriverDao.java +++ b/src/main/java/taxi/dao/DriverDao.java @@ -1,6 +1,8 @@ package taxi.dao; +import java.util.Optional; import taxi.model.Driver; public interface DriverDao extends GenericDao { + Optional findByLogin(String login); } diff --git a/src/main/java/taxi/dao/DriverDaoImpl.java b/src/main/java/taxi/dao/DriverDaoImpl.java index f5e18f2a2..389261781 100644 --- a/src/main/java/taxi/dao/DriverDaoImpl.java +++ b/src/main/java/taxi/dao/DriverDaoImpl.java @@ -17,13 +17,15 @@ public class DriverDaoImpl implements DriverDao { @Override public Driver create(Driver driver) { - String query = "INSERT INTO drivers (name, license_number) " - + "VALUES (?, ?)"; + String query = "INSERT INTO drivers (name, license_number, login, password) " + + "VALUES (?, ?, ?, ?)"; try (Connection connection = ConnectionUtil.getConnection(); PreparedStatement statement = connection.prepareStatement(query, Statement.RETURN_GENERATED_KEYS)) { statement.setString(1, driver.getName()); statement.setString(2, driver.getLicenseNumber()); + statement.setString(3, driver.getLogin()); + statement.setString(4, driver.getPassword()); statement.executeUpdate(); ResultSet resultSet = statement.getGeneratedKeys(); if (resultSet.next()) { @@ -71,14 +73,17 @@ public List getAll() { @Override public Driver update(Driver driver) { String query = "UPDATE drivers " - + "SET name = ?, license_number = ? " + + "SET name = ?, license_number = ?, " + + "login = ?, password = ? " + "WHERE id = ? AND is_deleted = FALSE"; try (Connection connection = ConnectionUtil.getConnection(); PreparedStatement statement = connection.prepareStatement(query)) { statement.setString(1, driver.getName()); statement.setString(2, driver.getLicenseNumber()); - statement.setLong(3, driver.getId()); + statement.setString(3, driver.getLogin()); + statement.setString(4, driver.getPassword()); + statement.setLong(5, driver.getId()); statement.executeUpdate(); return driver; } catch (SQLException e) { @@ -102,10 +107,31 @@ private Driver parseDriverFromResultSet(ResultSet resultSet) throws SQLException Long id = resultSet.getObject("id", Long.class); String name = resultSet.getString("name"); String licenseNumber = resultSet.getString("license_number"); + String login = resultSet.getString("login"); + String password = resultSet.getString("password"); Driver driver = new Driver(); driver.setId(id); driver.setName(name); driver.setLicenseNumber(licenseNumber); + driver.setLogin(login); + driver.setPassword(password); return driver; } + + @Override + public Optional findByLogin(String login) { + String query = "SELECT * FROM drivers WHERE login = ? AND is_deleted = FALSE"; + try (Connection connection = ConnectionUtil.getConnection(); + PreparedStatement statement = connection.prepareStatement(query)) { + statement.setString(1, login); + ResultSet resultSet = statement.executeQuery(); + Driver driver = null; + if (resultSet.next()) { + driver = parseDriverFromResultSet(resultSet); + } + return Optional.ofNullable(driver); + } catch (SQLException e) { + throw new DataProcessingException("Can't get driver by login " + login, e); + } + } } diff --git a/src/main/java/taxi/exception/AuthenticationException.java b/src/main/java/taxi/exception/AuthenticationException.java new file mode 100644 index 000000000..c612043a7 --- /dev/null +++ b/src/main/java/taxi/exception/AuthenticationException.java @@ -0,0 +1,7 @@ +package taxi.exception; + +public class AuthenticationException extends Exception { + public AuthenticationException(String message) { + super(message); + } +} diff --git a/src/main/java/taxi/model/Driver.java b/src/main/java/taxi/model/Driver.java index 9c375f94c..9d8477008 100644 --- a/src/main/java/taxi/model/Driver.java +++ b/src/main/java/taxi/model/Driver.java @@ -6,13 +6,33 @@ public class Driver { private Long id; private String name; private String licenseNumber; + private String login; + private String password; public Driver() { } - public Driver(String name, String licenseNumber) { + public Driver(String name, String licenseNumber, String login, String password) { this.name = name; this.licenseNumber = licenseNumber; + this.login = login; + this.password = password; + } + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; } public Long getId() { diff --git a/src/main/java/taxi/service/AuthenticationService.java b/src/main/java/taxi/service/AuthenticationService.java new file mode 100644 index 000000000..fbf030942 --- /dev/null +++ b/src/main/java/taxi/service/AuthenticationService.java @@ -0,0 +1,8 @@ +package taxi.service; + +import taxi.exception.AuthenticationException; +import taxi.model.Driver; + +public interface AuthenticationService { + Driver login(String login, String password) throws AuthenticationException; +} diff --git a/src/main/java/taxi/service/AuthenticationServiceImpl.java b/src/main/java/taxi/service/AuthenticationServiceImpl.java new file mode 100644 index 000000000..5222829fc --- /dev/null +++ b/src/main/java/taxi/service/AuthenticationServiceImpl.java @@ -0,0 +1,23 @@ +package taxi.service; + +import java.util.Optional; +import taxi.exception.AuthenticationException; +import taxi.lib.Injector; +import taxi.lib.Service; +import taxi.model.Driver; + +@Service +public class AuthenticationServiceImpl implements AuthenticationService { + private static final Injector injector = Injector.getInstance("taxi"); + private final DriverService driverService = (DriverService) injector + .getInstance(DriverService.class); + + @Override + public Driver login(String login, String password) throws AuthenticationException { + Optional driver = driverService.findByLogin(login); + if (driver.isPresent() && driver.get().getPassword().equals(password)) { + return driver.get(); + } + throw new AuthenticationException("Driver login or password is incorrect"); + } +} diff --git a/src/main/java/taxi/service/DriverService.java b/src/main/java/taxi/service/DriverService.java index faddf81b3..3dbdfe2f3 100644 --- a/src/main/java/taxi/service/DriverService.java +++ b/src/main/java/taxi/service/DriverService.java @@ -1,6 +1,8 @@ package taxi.service; +import java.util.Optional; import taxi.model.Driver; public interface DriverService extends GenericService { + Optional findByLogin(String login); } diff --git a/src/main/java/taxi/service/DriverServiceImpl.java b/src/main/java/taxi/service/DriverServiceImpl.java index e2f554b3f..cf14b8e39 100644 --- a/src/main/java/taxi/service/DriverServiceImpl.java +++ b/src/main/java/taxi/service/DriverServiceImpl.java @@ -2,6 +2,7 @@ import java.util.List; import java.util.NoSuchElementException; +import java.util.Optional; import taxi.dao.DriverDao; import taxi.lib.Inject; import taxi.lib.Service; @@ -38,4 +39,9 @@ public Driver update(Driver driver) { public boolean delete(Long id) { return driverDao.delete(id); } + + @Override + public Optional findByLogin(String login) { + return driverDao.findByLogin(login); + } } diff --git a/src/main/java/taxi/util/ConnectionUtil.java b/src/main/java/taxi/util/ConnectionUtil.java index 9a94e69a2..e4ec68ad1 100644 --- a/src/main/java/taxi/util/ConnectionUtil.java +++ b/src/main/java/taxi/util/ConnectionUtil.java @@ -6,10 +6,10 @@ import java.util.Properties; public class ConnectionUtil { - private static final String URL = "YOUR DATABASE URL"; - private static final String USERNAME = "YOUR USERNAME"; - private static final String PASSWORD = "YOUR PASSWORD"; - private static final String JDBC_DRIVER = "YOUR DRIVER"; + private static final String URL = "jdbc:mysql://localhost:3306/taxi?serverTimezone=UTC"; + private static final String USERNAME = "root"; + private static final String PASSWORD = "12345678"; + private static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver"; static { try { diff --git a/src/main/java/taxi/web/filter/AuthenticationFilter.java b/src/main/java/taxi/web/filter/AuthenticationFilter.java new file mode 100644 index 000000000..06b022ec3 --- /dev/null +++ b/src/main/java/taxi/web/filter/AuthenticationFilter.java @@ -0,0 +1,38 @@ +package taxi.web.filter; + +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +public class AuthenticationFilter implements Filter { + private final Set allowedUrls = new HashSet<>(); + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + allowedUrls.add("/login"); + allowedUrls.add("/drivers/add"); + } + + @Override + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain filterChain) throws IOException, ServletException { + HttpServletRequest req = (HttpServletRequest) request; + HttpServletResponse resp = (HttpServletResponse) response; + HttpSession httpSession = req.getSession(); + Long driverId = (Long) httpSession.getAttribute("driver_id"); + if (driverId == null && !allowedUrls.contains(req.getServletPath())) { + resp.sendRedirect("/login"); + return; + } + filterChain.doFilter(req, resp); + } +} diff --git a/src/main/webapp/WEB-INF/views/cars/add.jsp b/src/main/webapp/WEB-INF/views/cars/add.jsp index c23ba0b4f..3f4a386a5 100644 --- a/src/main/webapp/WEB-INF/views/cars/add.jsp +++ b/src/main/webapp/WEB-INF/views/cars/add.jsp @@ -5,6 +5,7 @@ + <%@include file='/WEB-INF/views/header.jsp' %> Add car @@ -24,9 +25,10 @@ - + +<%@include file='/WEB-INF/views/footer.jsp' %> diff --git a/src/main/webapp/WEB-INF/views/cars/all.jsp b/src/main/webapp/WEB-INF/views/cars/all.jsp index 84f046299..402621d2e 100644 --- a/src/main/webapp/WEB-INF/views/cars/all.jsp +++ b/src/main/webapp/WEB-INF/views/cars/all.jsp @@ -5,6 +5,7 @@ + <%@include file='/WEB-INF/views/header.jsp' %> All cars @@ -43,5 +44,6 @@ +<%@include file='/WEB-INF/views/footer.jsp' %> diff --git a/src/main/webapp/WEB-INF/views/cars/drivers/add.jsp b/src/main/webapp/WEB-INF/views/cars/drivers/add.jsp index d281d5d72..35ebed749 100644 --- a/src/main/webapp/WEB-INF/views/cars/drivers/add.jsp +++ b/src/main/webapp/WEB-INF/views/cars/drivers/add.jsp @@ -5,12 +5,16 @@ + <%@include file='/WEB-INF/views/header.jsp' %> Add driver to car

Add driver to car:

+ + + @@ -24,9 +28,10 @@
${errorMsg}
Car ID Driver ID - +
+<%@include file='/WEB-INF/views/footer.jsp' %> diff --git a/src/main/webapp/WEB-INF/views/cars/drivers/current.jsp b/src/main/webapp/WEB-INF/views/cars/drivers/current.jsp new file mode 100644 index 000000000..03912170c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cars/drivers/current.jsp @@ -0,0 +1,39 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + <%@include file='/WEB-INF/views/header.jsp' %> + All cars + + +

Cars for current driver:

+ + + + + + + + + + + + + + + +
IDModelManufacturer nameManufacturer country
+ + + + + + + +
+<%@include file='/WEB-INF/views/footer.jsp' %> + + diff --git a/src/main/webapp/WEB-INF/views/drivers/add.jsp b/src/main/webapp/WEB-INF/views/drivers/add.jsp index 4ad7cee44..425cc7209 100644 --- a/src/main/webapp/WEB-INF/views/drivers/add.jsp +++ b/src/main/webapp/WEB-INF/views/drivers/add.jsp @@ -5,6 +5,7 @@ + <%@include file='/WEB-INF/views/header.jsp' %> All drivers @@ -14,6 +15,8 @@ Name License number + Login + Password Add @@ -24,9 +27,16 @@ - + + + + + + + +<%@include file='/WEB-INF/views/footer.jsp' %> diff --git a/src/main/webapp/WEB-INF/views/drivers/all.jsp b/src/main/webapp/WEB-INF/views/drivers/all.jsp index 776101f73..1580fbc3c 100644 --- a/src/main/webapp/WEB-INF/views/drivers/all.jsp +++ b/src/main/webapp/WEB-INF/views/drivers/all.jsp @@ -5,6 +5,7 @@ + <%@include file='/WEB-INF/views/header.jsp' %> All drivers @@ -14,6 +15,8 @@ ID Name License number + Login + Password Delete @@ -27,11 +30,18 @@ + + + + + + DELETE +<%@include file='/WEB-INF/views/footer.jsp' %> diff --git a/src/main/webapp/WEB-INF/views/footer.jsp b/src/main/webapp/WEB-INF/views/footer.jsp new file mode 100644 index 000000000..441c9f9a4 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/footer.jsp @@ -0,0 +1,7 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + + diff --git a/src/main/webapp/WEB-INF/views/header.jsp b/src/main/webapp/WEB-INF/views/header.jsp new file mode 100644 index 000000000..f7d90de7e --- /dev/null +++ b/src/main/webapp/WEB-INF/views/header.jsp @@ -0,0 +1,8 @@ + +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + + diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp index b9b5e9d2b..7f89ed2eb 100644 --- a/src/main/webapp/WEB-INF/views/index.jsp +++ b/src/main/webapp/WEB-INF/views/index.jsp @@ -4,6 +4,7 @@ + <%@include file='/WEB-INF/views/header.jsp' %> My team @@ -15,6 +16,7 @@ Display All Drivers Display All Cars + Display Cars for currently logged driver Display All Manufacturers Create new Driver Create new Car diff --git a/src/main/webapp/WEB-INF/views/login.jsp b/src/main/webapp/WEB-INF/views/login.jsp new file mode 100644 index 000000000..8572baa2f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/login.jsp @@ -0,0 +1,41 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + Login + + +
+

Login:

+ + + + + + + + + + + + + + + + +
${errorMsg}
+ Please enter your login: +
+ Please enter your password: +
+ +
+ +
+
+ + diff --git a/src/main/webapp/WEB-INF/views/manufacturers/add.jsp b/src/main/webapp/WEB-INF/views/manufacturers/add.jsp index 108d3541c..7702d76cb 100644 --- a/src/main/webapp/WEB-INF/views/manufacturers/add.jsp +++ b/src/main/webapp/WEB-INF/views/manufacturers/add.jsp @@ -5,6 +5,7 @@ + <%@include file='/WEB-INF/views/header.jsp' %> Manufacturers @@ -24,9 +25,10 @@ - + +<%@include file='/WEB-INF/views/footer.jsp' %> diff --git a/src/main/webapp/WEB-INF/views/manufacturers/all.jsp b/src/main/webapp/WEB-INF/views/manufacturers/all.jsp index fd3eafdbf..5e89fd610 100644 --- a/src/main/webapp/WEB-INF/views/manufacturers/all.jsp +++ b/src/main/webapp/WEB-INF/views/manufacturers/all.jsp @@ -5,6 +5,7 @@ + <%@include file='/WEB-INF/views/header.jsp' %> All manufacturers @@ -33,5 +34,6 @@ +<%@include file='/WEB-INF/views/footer.jsp' %> diff --git a/src/main/webapp/web.xml b/src/main/webapp/web.xml index 284381048..ba46a7ad2 100644 --- a/src/main/webapp/web.xml +++ b/src/main/webapp/web.xml @@ -52,6 +52,15 @@ /cars + + GetMyCurrentCarsController + taxi.controller.car.GetMyCurrentCarsController + + + GetMyCurrentCarsController + /cars/drivers/current + + addCar taxi.controller.car.AddCarController @@ -105,4 +114,32 @@ deleteManufacturer /manufacturers/delete + + + LoginController + taxi.controller.LoginController + + + LoginController + /login + + + + LogoutController + taxi.controller.LogoutController + + + LogoutController + /logout + + + + AuthenticationFilter + taxi.web.filter.AuthenticationFilter + + + AuthenticationFilter + /* + +