I have a servlet that has to redirect to a remote page (another domain, another machine) and this new page is protected under basic authentication (you know, floating window asking for user/pass)...
Well, I´ve no problem to do it, using URLConnection or Apache HttpConnection...
Then I take the response and I write it on the standard servlet output. Now I have the new remote page.
BUT my problem is that (logically) I stay in my servlet context (that means, navigator´s URL is http://mymachine:8080/myservlet ) so every link in the new remote page is not working (because they´re not absolute but relative, as expected).
Then I´m trying to do a kind of sendRedirect(), but I´m not able to put it to work. request.sendRedirect() is not working because the page is asking me again for user & pass.