org.springframework.extensions.webscripts.servlet.mvc
Class HTTPProxyController
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.springframework.extensions.webscripts.servlet.mvc.HTTPProxyController
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller
public class HTTPProxyController
- extends org.springframework.web.servlet.mvc.AbstractController
HTTP Proxy Controller for Spring MVC
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, muzquiano
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
METHOD_GET, METHOD_HEAD, METHOD_POST |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
logger |
Method Summary |
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 |
org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
|
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTTPProxyController
public HTTPProxyController()
handleRequestInternal
public org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws Exception
- Specified by:
handleRequestInternal
in class org.springframework.web.servlet.mvc.AbstractController
- Throws:
Exception
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
Copyright © 2009 SpringSource, Inc. All Rights Reserved.