Class HTTPProxyServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class HTTPProxyServlet
    extends javax.servlet.http.HttpServlet
    HTTP Proxy Servlet Provides the ability to submit a URL request via the Alfresco Server i.e. the Alfresco server acts as a proxy. This servlet accepts: /proxy?endpoint=[&=]* Where: - endpointUrl is the URL to make a request against - argName is the name of a URL argument to append to the request - argValue is the value of URL argument E.g.: /proxy?endpoint=http://www.alfresco.com&arg1=value1&arg2=value2
    Author:
    davidc
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String createProxyUrl​(java.lang.String url)
      Construct a "proxied" URL Note: the "proxied" URL is a relative url - it is assumed that the servlet path is /proxy
      protected void doGet​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPost, 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

      • HTTPProxyServlet

        public HTTPProxyServlet()
    • Method Detail

      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws javax.servlet.ServletException,
                             java.io.IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
        See Also:
        HttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
      • createProxyUrl

        public static java.lang.String createProxyUrl​(java.lang.String url)
        Construct a "proxied" URL Note: the "proxied" URL is a relative url - it is assumed that the servlet path is /proxy
        Parameters:
        url - the URL to proxy
        Returns:
        the "proxied" url