Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Embedded Jetty and Wicket

How can I get Wicket to run under embedded Jetty? Wicket works by setting up web.xml to send all requests to the WicketFilter. I tried this, but in WicketFilter, getServletContext() returns null:

Server server = new Server(8080);
           ServletHandler foo = new ServletHandler();
           FilterHolder filterHolder = new FilterHolder();
           filterHolder.setFilter(new WicketFilter());
filterHolder.setInitParameter("applicationClassName", MyApplication.class.getName());
FilterMapping filterMapping = new FilterMapping();
foo.addFilter(filterHolder, filterMapping);
server.start(); foo.initialize(); server.join();

Looking around, I found out that I'm not setting up a Context object, but this was with Jetty 6, and I'm not sure how I'd associate the context with that specific FilterHandler.

Back to the top