Configuring the AJAX proxy
Use the AJAX proxy to broker client requests from multiple domains while using AJAX.
Create a Web 2.0 enabled Web project ensuring that you have enabled the AJAX proxy facet.
When you create a Web project with the AJAX proxy facet enabled, the AJAX proxy configuration file, proxy-config.xml, is automatically generated in the WEB-INF folder. To configure the AJAX proxy:
- Double-click proxy-config.xml to open it in the editor.
- Modify the proxy-config.xml file to define URI context paths and policies that the proxy supports.
The proxy-config.xml file defines the policy by which URI requests are supported to pass through the proxy and how context paths from the client are mapped to the URI on a server. The proxy-config.xml file can be modified by an editor and needs to be in location on the classpath that the proxy servlet can locate. Changes to the proxy-config.xml file are not dynamic; you need to restart the servlet for the changes to take affect.
Related concepts
The importance of the proxy for Ajax