I want to hide the url when redirected to page on other server. For Eg : This is the index.jsp Page
<body>
<form id="inset_form" >
<input type="submit" value="GO" onclick="func();">
</form>
</body>
When someone clicks on submit it will go to servlet.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
System.out.println("Post");
response.sendRedirect("https://stackoverflow.com/questions/14018215/what-is-url-pattern-in-web-xml-and-how-to-configure-servlet");
}
Now it will redirect to the page on another server
https://stackoverflow.com/questions/14018215/what-is-url-pattern-in-web-xml-and-how-to-configure-servlet
Now I want the url like this : https://stackoverflow.com/questions/anotherPage
instead of
https://stackoverflow.com/questions/14018215/what-is-url-pattern-in-web-xml-and-how-to-configure-servlet
but it should redirect to same page only with some information hidden.
If it is possible then please help.
Thanks in advance.