I\'m using the servlet which redirects me with the help of
dispatcher.forward(request, response);
in the end. But after this I want to get
Try using
request.getAttribute("javax.servlet.forward.request_uri")
See https://tomcat.apache.org/tomcat-9.0-doc/servletapi/constant-values.html and How to get the url of the client