Object aliasObj = ref.getProperty(ApplicationFactory.ALIAS_NAME);
if(aliasObj instanceof String) {
String alias = (String) aliasObj;
BundleContentHttpContext httpContext = new BundleContentHttpContext(ref.getBundle());
ApplicationFactory factory = (ApplicationFactory) context.getService(ref);
ApplicationFactoryServlet servlet = new ApplicationFactoryServlet(factory);
try {
httpService.registerServlet(alias, servlet, null, httpContext);
return alias;