|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.gwtopenmaps.openlayers.server.GwtOpenLayersProxyServlet
public class GwtOpenLayersProxyServlet
This is a transparent HTTP proxy written in Java that is similar to the proxy in the OpenLayers examples, which is written in Python. These proxies are used to circumvent browser restrictions on cross-domain requests with Javascript.
To use the proxy you need to 1) configure the proxy servlet in your web.xml and 2) use OpenLayers.setProxyHost to set the url-path to the proxy. If the proxy is configured to listen to the url-pattern '/gwtOpenLayersProxy/*' then the proxy host should be set to 'gwtOpenLayersProxy?targetURL='.
Initial code for this proxy is based upon the following code
Constructor Summary | |
---|---|
GwtOpenLayersProxyServlet()
|
Method Summary | |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GwtOpenLayersProxyServlet()
Method Detail |
---|
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |