|Using the Proxy / Why Use the Proxy?|
To achieve this, a proxy has been provided that will forward requests to a remote host and appear to the browser to still be in the domain. The Java proxy can be deployed to any Java servlet container that implements the Servlet 2.4 specification or higher.
The proxy simply takes an URL as a parameter and requests the page, passing the contents back to the requester. Given the proxy is installed on a server of a local machine on port 80, you can access the web page http://myserver:8765/some/path/example.html by calling http://localhost/riaproxy?url=http://myserver:8765/some/path/example.html. The result sent by the proxy will be the same as if the target URL was accessed directly. The important difference is the second URL will be seen by a browser as part of the local domain http://localhost/ instead of http://myserver:8765/. Note that the URL parameter needs to be encoded properly to follow the syntax rules of Internet URLs (conf. RFC 1738: Uniform Resource Locators).