Search in sources :

Example 1 with VaadinResourceServlet

use of org.opennms.vaadin.extender.internal.servlet.VaadinResourceServlet in project opennms by OpenNMS.

the class Activator method createAndRegisterVaadinResourceServlet.

private void createAndRegisterVaadinResourceServlet() {
    Bundle vaadin = null;
    for (Bundle bundle : bundleContext.getBundles()) {
        if ("com.vaadin.client-compiled".equals(bundle.getSymbolicName())) {
            vaadin = bundle;
            break;
        }
    }
    Dictionary<String, String> props;
    props = new Hashtable<String, String>();
    props.put("alias", VaadinResourceServlet.VAADIN);
    HttpServlet vaadinResourceServlet = new VaadinResourceServlet(vaadin);
    resourceService = bundleContext.registerService(Servlet.class.getName(), vaadinResourceServlet, props);
    bundleContext.registerService(VaadinResourceService.class.getName(), vaadinResourceServlet, null);
}
Also used : Bundle(org.osgi.framework.Bundle) HttpServlet(javax.servlet.http.HttpServlet) VaadinResourceServlet(org.opennms.vaadin.extender.internal.servlet.VaadinResourceServlet) VaadinResourceService(org.opennms.vaadin.extender.VaadinResourceService)

Aggregations

HttpServlet (javax.servlet.http.HttpServlet)1 VaadinResourceService (org.opennms.vaadin.extender.VaadinResourceService)1 VaadinResourceServlet (org.opennms.vaadin.extender.internal.servlet.VaadinResourceServlet)1 Bundle (org.osgi.framework.Bundle)1