Answer the question
In order to leave comments, you need to log in
What is the difference between redirect and requestDispatcher?
Hello. Help, please, to solve a problem. I need the servlet to redirect the user to the specified page. There are two ways to do this.
req.getRequestDispatcher("/demo/new.jsp").forward(req, resp);
//или
resp.sendRedirect("/demo/new.jsp");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question