protected void activate() { try { logger.debug("Starting up proxy servlet at /" + PROXY_ALIAS); Hashtable<String, String> props = new Hashtable<String, String>(); httpService.registerServlet("/" + PROXY_ALIAS, this, props, createHttpContext()); } catch (NamespaceException e) { logger.error("Error during servlet startup: {}", e.getMessage()); } catch (ServletException e) { logger.error("Error during servlet startup: {}", e.getMessage()); } }
@SuppressWarnings("rawtypes") @Activate protected void activate(ComponentContext context) { Dictionary props = context.getProperties(); noUserRedirectLocationFormat = PropertiesUtil.toString( props.get(NO_USER_REDIRECT_LOCATION_FORMAT), DEFAULT_NO_USER_REDIRECT_FORMAT); registrationPath = PropertiesUtil.toString(props.get(REGISTRATION_PATH), "/system/trustedauth"); defaultDestination = PropertiesUtil.toString(props.get(DEFAULT_DESTINATION), "/dev"); try { httpService.registerServlet(registrationPath, this, null, null); LOGGER.info("Registered {} at {} ", this, registrationPath); } catch (ServletException e) { LOGGER.error(e.getMessage(), e); } catch (NamespaceException e) { LOGGER.error(e.getMessage(), e); } }