The URL does not change after redirection to the dispatcher page from the servlet.
There is an authorization page ( index.jsp - the start page), there is a page where users get after successful authorizationB. There is an Auth servlet in which authorization occurs. The Post method is used. The servlet refers to the class that makes the connection to the database and checks if there is such a user (checks the login and password too) and returns ture or false . If it returns false, an error text will appear on the main page in the authorization form. For this reason, I have to use the Dispatcher . If an error is returned, yes, and if successful URL authorization does not change. He he remains "/ Auth".
The question is how to solve this problem? sendRedirect does not suit me because I need to display an error message if it is. And so sendRedirect changes the link.
How to get out of this situation?