public class WFSProxyBehavior
extends org.apache.wicket.behavior.AbstractAjaxBehavior
Author:
mocleiri
When working with Web Feature Service (WFS) Requests a proxy needs to be used to get
around cross site scripting restrictions that are present in browsers.
The Openlayers.org site lists several CGI approaches for proxying. In this approach we
implement a proxy within a Wicket Ajax Behavior.
In order to make the behaviour work it needs to be added onto the OpenLayersMap; and
emitted when the map is created in javascript.
Then the OpenLayers.ProxyHost=behaviour.getProxyUrl() method can be used.
See openlayers-examples for an example (e.g. MapWithWMSGetFeatureInfo.class)
Using this behaviour binds the lifecycle of map access to an active session which is
useful in some cases but might be a problem in others.
The ProxyRequestTarget implementation could be used for example in a Servlet Filter to
proxy without caring about the current session and/or the users authorization to view the
map data.