本文整理汇总了Java中org.mortbay.jetty.servlet.Context.getServletHandler方法的典型用法代码示例。如果您正苦于以下问题:Java Context.getServletHandler方法的具体用法?Java Context.getServletHandler怎么用?Java Context.getServletHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mortbay.jetty.servlet.Context
的用法示例。
在下文中一共展示了Context.getServletHandler方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addFilterPathMapping
import org.mortbay.jetty.servlet.Context; //导入方法依赖的package包/类
/**
* Add the path spec to the filter path mapping.
* @param pathSpec The path spec
* @param webAppCtx The WebApplicationContext to add to
*/
protected void addFilterPathMapping(String pathSpec,
Context webAppCtx) {
ServletHandler handler = webAppCtx.getServletHandler();
for(String name : filterNames) {
FilterMapping fmap = new FilterMapping();
fmap.setPathSpec(pathSpec);
fmap.setFilterName(name);
fmap.setDispatches(Handler.ALL);
handler.addFilterMapping(fmap);
}
}
示例2: defineFilter
import org.mortbay.jetty.servlet.Context; //导入方法依赖的package包/类
/**
* Define a filter for a context and set up default url mappings.
*/
public void defineFilter(Context ctx, String name,
String classname, Map<String,String> parameters, String[] urls) {
FilterHolder holder = new FilterHolder();
holder.setName(name);
holder.setClassName(classname);
holder.setInitParameters(parameters);
FilterMapping fmap = new FilterMapping();
fmap.setPathSpecs(urls);
fmap.setDispatches(Handler.ALL);
fmap.setFilterName(name);
ServletHandler handler = ctx.getServletHandler();
handler.addFilter(holder, fmap);
}
示例3: defineFilter
import org.mortbay.jetty.servlet.Context; //导入方法依赖的package包/类
/**
* Define a filter for a context and set up default url mappings.
*/
public static void defineFilter(Context ctx, String name,
String classname, Map<String,String> parameters, String[] urls) {
FilterHolder holder = new FilterHolder();
holder.setName(name);
holder.setClassName(classname);
holder.setInitParameters(parameters);
FilterMapping fmap = new FilterMapping();
fmap.setPathSpecs(urls);
fmap.setDispatches(Handler.ALL);
fmap.setFilterName(name);
ServletHandler handler = ctx.getServletHandler();
handler.addFilter(holder, fmap);
}
示例4: defineFilter
import org.mortbay.jetty.servlet.Context; //导入方法依赖的package包/类
/**
* Define a filter for a context and set up default url mappings.
*/
protected void defineFilter(Context ctx, String name,
String classname, Map<String,String> parameters, String[] urls) {
FilterHolder holder = new FilterHolder();
holder.setName(name);
holder.setClassName(classname);
holder.setInitParameters(parameters);
FilterMapping fmap = new FilterMapping();
fmap.setPathSpecs(urls);
fmap.setDispatches(Handler.ALL);
fmap.setFilterName(name);
ServletHandler handler = ctx.getServletHandler();
handler.addFilter(holder, fmap);
}
示例5: defineFilter
import org.mortbay.jetty.servlet.Context; //导入方法依赖的package包/类
/**
* Define a filter for a context and set up default url mappings.
*/
private static void defineFilter(Context ctx, FilterHolder holder,
FilterMapping fmap) {
ServletHandler handler = ctx.getServletHandler();
handler.addFilter(holder, fmap);
}