Web tier: servlets, JSP, Web frameworks: RequestDispatcher
can we use RequestDispatcher to hit URL out of the current server..
some thing like this
RequestDispatcher dis_ = getServletContext().getRequestDispatcher("http://www.google.com/search?q=JSP").
If you're using the ServletContext to retrieve a request dispatcher, you can only get them for named servlets or paths relative to the context root.
There's nothing in the RequestDispatcher interface itself (AFAIK) that would stop it from being used from a remote site, but there's no way that I'm aware of to get one.
If you were looking to perform a forward, though, you could use response.sendRedirect( ).