public class ReverseProxyServlet extends AbstractBaseServlet
<servlet> <servlet-name>ReverseProxyServlet</servlet-name> <display-name>ReverseProxyServlet</display-name> <description>reverse proxy servlet om XHR te laten werken</description> <servlet-class>nl.mineleni.cbsviewer.servlet.ReverseProxyServlet</servlet-class> <init-param> <param-name>allowed_hosts</param-name> <param-value>dbr4011v.dbr.agro.nl; ws.geonames.org; cacheflow.nic.agro.nl:8080</param-value> <description>Servers die zijn toegestaan om te benaderen via deze proxy, scheiden door een ; [punt-komma]. Verplichte param</description> </init-param> <init-param> <param-name>force_xml_mime</param-name> <param-value>false</param-value> <description>optie om text/xml mime type voor response te forceren, optionele param</description> </init-param> <load-on-startup>2</load-on-startup> </servlet>
Modifier and Type | Field and Description |
---|---|
static String |
ALLOWED_HOSTS
Allowed hosts config optie.
|
static String |
ERR_MSG_MISSING_CONFIG
Foutmelding in geval van missende 'allowed_hosts' optie.
|
static String |
FORCE_XML_MIME
Forceer xml output optie sleutel.
|
USER_ID, USER_PASSWORD
Constructor and Description |
---|
ReverseProxyServlet() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Process the HTTP Get request.
|
void |
init(ServletConfig config)
Initialize variables called when context is initialized.
|
getPassID, getProxyHost, getProxyPort, getUserID
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public static final String ALLOWED_HOSTS
public static final String FORCE_XML_MIME
public static final String ERR_MSG_MISSING_CONFIG
public void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException
WMSproxy/proxy?
doGet
in class HttpServlet
request
- the requestresponse
- the responseServletException
- the servlet exceptionpublic void init(ServletConfig config) throws ServletException
ALLOWED_HOSTS
(verplichte optie) en FORCE_XML_MIME
uit de configuratie.init
in interface Servlet
init
in class AbstractBaseServlet
config
- the ServletConfig
object that contains
configutation information for this servletServletException
- if an exception occurs that interrupts the servlet's normal
operationGenericServlet.init(javax.servlet.ServletConfig)
Copyright © 2012–2014 Ministerie EZ. All rights reserved.