Code example for Hashtable

Methods: put

0
 
    } 
 
    protected void setHttpService(HttpService httpService) {
        try { 
            Dictionary<String, String> initParams = new Hashtable<String, String>();
            initParams.put("javax.ws.rs.Application", RestAPIApp.class.getName());
            httpService.registerServlet(path, new RestAPIServlet(), initParams, null);
        } catch (ServletException e) {
            log.error(e.getMessage(), e);
            throw new RuntimeException(e);
        } catch (NamespaceException e) {
            log.error(e.getMessage(), e);
            throw new RuntimeException(e);
        } catch (Throwable e) {
            log.error(e.getMessage(), e);
            throw new RuntimeException(e);
        } 
 
    }