How a servlet returns the requested page according to different request pages

a.jap sends a request to the servlet and returns to a.jap
b.jsp sends a request to the servlet and returns to b.jap
How does the servlet determine whether it is a request from page a or page b? ? For example, return to the home page after logging in on the home page: request.getHeader("Referer");// Get the address of the previous page such as: a.jsp and then jump back to a.jsp after processing: response.sendRedirect(request.getHeader( "Referer"));

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326647087&siteId=291194637