Of course it's not working for external links. Servlet is enclosed in a servlet container (a sort of a sandbox) so how could it dispatch the incoming request to the external server? Also look at the docs:
"Defines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server".
Google for "java proxy servlet", and implement one of the found solutions.