I tried the following code to redirect to another page
where location is the variable containing the new url. it opens new window but never redirected. When I placed a test message the message was infinitly writtin to the console
When I tried using href instead it works
But I don't the user to click to be redirected to the new page I want to redirect automatically. Can anyone see where I'm wrong?
formation of meta tag has problem, replace yours with below one.
out.println ("<meta HTTP-EQUIV=\"REFRESH\" content=\"2; url="+location+"\">"+"</meta>");