Package org.alfresco.web.app.servlet
Class HTTPProxyServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.alfresco.web.app.servlet.HTTPProxyServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class HTTPProxyServlet
extends jakarta.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:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateProxyUrl(String url) Construct a "proxied" URL Note: the "proxied" URL is a relative url - it is assumed that the servlet path is /proxyprotected voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
HTTPProxyServlet
public HTTPProxyServlet()
-
-
Method Details
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException- See Also:
-
HttpServlet.doGet(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
-
createProxyUrl
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
-