org.gwtopenmaps.openlayers.server
Class GwtOpenLayersProxyServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.gwtopenmaps.openlayers.server.GwtOpenLayersProxyServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class GwtOpenLayersProxyServlet
- extends javax.servlet.http.HttpServlet
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
see also this networking tutorial
- See Also:
- Serialized Form
|
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 |
GwtOpenLayersProxyServlet
public GwtOpenLayersProxyServlet()
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
Copyright © 2013 sourceforge. All Rights Reserved.