Web tier: servlets, JSP, Web frameworks: How to access web resource from a different server
- Posted by: sreejith panicker
- Posted on: June 14 2004 08:45 EDT
Can anybody suggest, how to access a web resource on a server from a servlet which is on another web context(Different server). I don't want to use sendRedirect of the response object.
- How to access web resource from a different server by Paul Strack on June 14 2004 11:08 EDT
There is no way to perform a forward() operation to a servlet or JSP on a different server, so that's out.
The servlet/JSP on server A can access the servlet/JSP on server B using the same mechanism as a client: by opening an HTTP connection (using java.net.URL) and downloading its output.