I have a system that allows guest logins via a guest account. I cannot modify the source code of the system, but I can add my own JSP files. I am implementing an anti-phishing login process and don’t want to expose the real login URL in my HTML. Instead of creating a “guest” link that posts directly to the real login URL, I would like to forward the user to my own JSP that redirects their request to the real login.
This means I need to send POST data do the real login script in my redirect. If possible, I do not want to use the HttpClient class to open a connection and do the posting. The system does several redirects of its own after posting to the login script. Which means I would have to handle them myself if I used HttpClient.
So, is it possible to do a response.sendRedirect() and include POST data to the redirect URL?
Just
forwardthe complete request to the other controller (servlet/JSP) and let the other controller process and respond.From the Java Docs: