What I am trying to do :
1. I have created a small application (servlet, HTML & log4j.properties) that is deployed in a web server. There is a switch (say wireless router) that intercepts clients (who are outside network) trying to access wireless network and routes the request to the HTML in the application. The HTML contains some form info that user needs to fill and submit. When he submits this form, it sends the request to the servlet (via GET), the servlet logs the required info, authenticates user and needs to redirect the user back to the site that he initially tried to access.
2. I got everything working but the redirect part. What I am trying to do for redirection is this -
So, when the client tries to go to "www.google.com", the switch redirects to the HTML, user enters the form data and submits the page. This is then sent to the servlet which logs required info, but is not able to redirect to the site 'www.google.com'. The URL at the client end is changed to http://18.104.22.168/www.google.com
(where 22.214.171.124 is the IP address of the web server that hosts this application.)
Seeking experts help in redirecting to an URL (which is outside the application) from servlet.