public class AjaxProxyServlet extends javax.servlet.http.HttpServlet
Used for Ajax requests that needs to be proxied to avoid XSiteScripting issues.
In order to avoid "open proxiying", only urls configured in the AjaxProxyComponent via the extension point
"proxyableURL" can be proxied.
| Modifier and Type | Field and Description |
|---|---|
protected static ReentrantReadWriteLock |
cacheLock |
protected static Map<String,String> |
requestsCache |
protected static AjaxProxyService |
service |
static String |
X_METHOD_HEADER |
| Constructor and Description |
|---|
AjaxProxyServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected static String |
doRequest(String method,
String targetURL,
javax.servlet.http.HttpServletRequest req) |
protected static AjaxProxyService |
getService() |
protected static String |
getSessionId(javax.servlet.http.HttpServletRequest req) |
protected static void |
handleProxy(String method,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
doDelete, doHead, doOptions, doTrace, getLastModified, service, servicepublic static final String X_METHOD_HEADER
protected static AjaxProxyService service
protected static Map<String,String> requestsCache
protected static final ReentrantReadWriteLock cacheLock
public AjaxProxyServlet()
protected static AjaxProxyService getService()
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doPut in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected static void handleProxy(String method, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
IOExceptionprotected static String getSessionId(javax.servlet.http.HttpServletRequest req)
protected static String doRequest(String method, String targetURL, javax.servlet.http.HttpServletRequest req) throws IOException
IOExceptionCopyright © 2016 Nuxeo SA. All rights reserved.