chapter_007/src/main/java/ru/job4j/servlets/FindByIdServlet.java
/**
     * Find the user form DB and request on the FindById.jsp.
     *
     * @param req  - HttpServletRequest.
     * @param resp - HttpServletResponse.
     * @throws ServletException - ServletException.
     * @throws IOException      - IOException.
     */
Find the user form DB and request on the FindById.jsp.
@param req  - HttpServletRequest.
@param resp - HttpServletResponse.
Find the user form DB and request on the FindById . jsp . @param req - HttpServletRequest . @param resp - HttpServletResponse .
@Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setAttribute("user", this.vs.findById(Integer.parseInt(req.getParameter("id"))));
        req.getRequestDispatcher("WEB-INF/views/FindById.jsp").forward(req, resp);
    }
@ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws ServletException , IOException { req . setAttribute ( "user" , this . vs . findById ( Integer . parseInt ( req . getParameter ( "id" ) ) ) ) ; req . getRequestDispatcher ( "WEB-INF/views/FindById.jsp" ) . forward ( req , resp ) ; }
Find the user form DB and request on the FindById.jsp.
Find the user form DB and request on the FindById . jsp .