Search in sources :

Example 1 with WicketFilter

use of org.apache.wicket.protocol.http.WicketFilter in project nutch by apache.

the class NutchUiServer method startServer.

private static void startServer() throws Exception, InterruptedException {
    Server server = new Server(port);
    Context context = new Context(server, "/", Context.SESSIONS);
    context.addServlet(DefaultServlet.class, "/*");
    context.addEventListener(new ContextLoaderListener(getContext()));
    context.addEventListener(new RequestContextListener());
    WicketFilter filter = new WicketFilter();
    filter.setFilterPath("/");
    FilterHolder holder = new FilterHolder(filter);
    holder.setInitParameter("applicationFactoryClassName", APP_FACTORY_NAME);
    context.addFilter(holder, "/*", Handler.DEFAULT);
    server.setHandler(context);
    server.start();
    server.join();
}
Also used : WebApplicationContext(org.springframework.web.context.WebApplicationContext) Context(org.mortbay.jetty.servlet.Context) AnnotationConfigWebApplicationContext(org.springframework.web.context.support.AnnotationConfigWebApplicationContext) RequestContextListener(org.springframework.web.context.request.RequestContextListener) FilterHolder(org.mortbay.jetty.servlet.FilterHolder) Server(org.mortbay.jetty.Server) WicketFilter(org.apache.wicket.protocol.http.WicketFilter) ContextLoaderListener(org.springframework.web.context.ContextLoaderListener)

Aggregations

WicketFilter (org.apache.wicket.protocol.http.WicketFilter)1 Server (org.mortbay.jetty.Server)1 Context (org.mortbay.jetty.servlet.Context)1 FilterHolder (org.mortbay.jetty.servlet.FilterHolder)1 ContextLoaderListener (org.springframework.web.context.ContextLoaderListener)1 WebApplicationContext (org.springframework.web.context.WebApplicationContext)1 RequestContextListener (org.springframework.web.context.request.RequestContextListener)1 AnnotationConfigWebApplicationContext (org.springframework.web.context.support.AnnotationConfigWebApplicationContext)1