use of org.apache.sling.engine.impl.filter.ServletFilterManager.FilterChainType in project sling by apache.
the class SlingRequestProcessorImpl method dispatchRequest.
// ---------- Generic Content Request processor ----------------------------
/**
* Dispatches the request on behalf of the
* {@link org.apache.sling.engine.impl.request.SlingRequestDispatcher}.
*/
public void dispatchRequest(ServletRequest request, ServletResponse response, Resource resource, RequestPathInfo resolvedURL, boolean include) throws IOException, ServletException {
// we need a SlingHttpServletRequest/SlingHttpServletResponse tupel
// to continue
SlingHttpServletRequest cRequest = RequestData.toSlingHttpServletRequest(request);
SlingHttpServletResponse cResponse = RequestData.toSlingHttpServletResponse(response);
// get the request data (and btw check the correct type)
final RequestData requestData = RequestData.getRequestData(cRequest);
final ContentData oldContentData = requestData.getContentData();
final ContentData contentData = requestData.setContent(resource, resolvedURL);
try {
// resolve the servlet
Servlet servlet = servletResolver.resolveServlet(cRequest);
contentData.setServlet(servlet);
FilterChainType type = include ? FilterChainType.INCLUDE : FilterChainType.FORWARD;
processComponent(cRequest, cResponse, type);
} finally {
requestData.resetContent(oldContentData);
}
}
use of org.apache.sling.engine.impl.filter.ServletFilterManager.FilterChainType in project sling by apache.
the class WebConsoleConfigPrinter method printConfiguration.
/**
* Print out the servlet filter chains.
* @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
*/
public void printConfiguration(PrintWriter pw) {
pw.println("Current Apache Sling Servlet Filter Configuration");
for (FilterChainType type : FilterChainType.values()) {
pw.println();
pw.println(type + " Filters:");
printFilterChain(pw, filterManager.getFilterChain(type).getFilters());
}
}
Aggregations