Code example for Hashtable

Methods: put

0
        Dictionary dictionaryResourceParams = null;
        OpenIDUserServlet userServlet = null;
        OpenIDProviderServlet providerServlet = null;
 
        // Register OpenIDUserServlet 
        dictionaryResourceParams = new Hashtable(1);
        dictionaryResourceParams.put("url-pattern", "/openid");
        userServlet = new OpenIDUserServlet();
        bundleContext.registerService(Servlet.class.getName(), userServlet,
                dictionaryResourceParams);
 
        // Register OpenIDServerServlet 
        dictionaryResourceParams = new Hashtable(1);
        dictionaryResourceParams.put("url-pattern", "/openidserver");
        providerServlet = new OpenIDProviderServlet();
        bundleContext.registerService(Servlet.class.getName(), providerServlet,
                dictionaryResourceParams);
    } 
 
}