本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.addFilter()
方法的一些代码示例,展示了WebAppContext.addFilter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.addFilter()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:addFilter
暂无
代码示例来源:origin: com.github.albfernandez.test-jsf/jsf-test-jetty
@Override
public void addFilter(FilterHolder filerHolder) {
Map<String, String> initParameters = filerHolder.getInitParameters();
String mapping = filerHolder.getMapping();
String name = filerHolder.getName();
Filter filter = filerHolder.getFilter();
org.mortbay.jetty.servlet.FilterHolder jettyFilterHolder = new org.mortbay.jetty.servlet.FilterHolder(filter);
jettyFilterHolder.setName(name);
jettyFilterHolder.setInitParameters(initParameters);
webAppContext.addFilter(jettyFilterHolder, mapping, Handler.ALL);
}
代码示例来源:origin: net.sf.portletunit/portletunit2
webapp.addFilter(new FilterHolder(filter), "/portal/*", 0);
SessionHandler sh = new SessionHandler();
sh.setSessionManager(new PlutoJettySessionManager());
代码示例来源:origin: com.senseidb/sensei-core
senseiApp.addFilter(GzipFilter.class, "/" + SENSEI_CONTEXT_PATH + "/*", 1);
代码示例来源:origin: datasalt/splout-db
context.addFilter(NoCacheFilter.class, "/*", Handler.DEFAULT);
FilterHolder gzipFilter = context.addFilter(GzipFilter.class, "/*", Handler.REQUEST);
gzipFilter.setInitParameter("mimeTypes", "text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,image/svg+xml,application/json");
gzipFilter.setInitParameter("bufferSize", "16384");
内容来源于网络,如有侵权,请联系作者删除!