Code example for Hashtable

Methods: put

0
            log.error("******* Failed to activate DB Console bundle ******* ", e);
        } 
    } 
    public void registerServlet(BundleContext bundleContext) throws Exception {
        HttpContext defaultHttpContext = httpService.createDefaultHttpContext();
        Dictionary<String,String> servletParam = new Hashtable<String,String>(2);
        servletParam.put("-webAllowOthers", "");
        httpService.registerServlet("/dbconsole", new WebServlet(), servletParam, defaultHttpContext);
     } 
 
    protected void deactivate(ComponentContext context) {
        httpService.unregister("/dbconsole");
        log.debug("******* DB Console bundle is deactivated ******* ");
    } 
 
    protected void setHttpService(HttpService httpService) {
        this.httpService = httpService;
    } 
 
    protected void unsetHttpService(HttpService httpService) {
        this.httpService = null;