Class HTTPProxyServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.alfresco.web.app.servlet.HTTPProxyServlet
All Implemented Interfaces:
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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    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 Details

    • HTTPProxyServlet

      public HTTPProxyServlet()
  • Method Details

    • doGet

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

      public static String createProxyUrl(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