@Override protected void doStart(URL url) { // TODO jetty will by default enable keepAlive so the xml config has no effect now httpServer = httpBinder.bind(url, new RestHandler()); ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort()); if (servletContext == null) { servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT); } if (servletContext == null) { throw new RpcException("No servlet context found. If you are using server='servlet', " + "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml"); } servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment); try { dispatcher.init(new SimpleServletConfig(servletContext)); } catch (ServletException e) { throw new RpcException(e); } }
@Override protected void doStart(URL url) { // TODO jetty will by default enable keepAlive so the xml config has no effect now httpServer = httpBinder.bind(url, new RestHandler()); ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort()); if (servletContext == null) { servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT); } if (servletContext == null) { throw new RpcException("No servlet context found. If you are using server='servlet', " + "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml"); } servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment); try { dispatcher.init(new SimpleServletConfig(servletContext)); } catch (ServletException e) { throw new RpcException(e); } }
@Override public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); Map<String,Object> restMap = applicationContext.getBeansWithAnnotation(javax.ws.rs.Path.class); Iterator<String> iterator = restMap.keySet().iterator(); while(iterator.hasNext()){ String key = iterator.next(); this.servletContainerDispatcher.getDispatcher().getRegistry().addSingletonResource(restMap.get(key)); } }
private void doInit(final ServletConfig servletConfig) throws ServletException { deployment.start(); servletConfig.getServletContext().setAttribute(ResteasyDeployment.class.getName(), deployment); super.init(servletConfig); if (log.isDebugEnabled()) { ResteasyProviderFactory providerFactory = getDispatcher().getProviderFactory(); log.debug("Provider factory: {}", providerFactory); log.debug("Configuration: {}", providerFactory.getConfiguration()); log.debug("Runtime type: {}", providerFactory.getRuntimeType()); log.debug("Built-ins registered: {}", providerFactory.isBuiltinsRegistered()); log.debug("Properties: {}", providerFactory.getProperties()); log.debug("Dynamic features: {}", providerFactory.getServerDynamicFeatures()); log.debug("Enabled features: {}", providerFactory.getEnabledFeatures()); log.debug("Class contracts: {}", providerFactory.getClassContracts()); log.debug("Reader interceptor registry: {}", providerFactory.getServerReaderInterceptorRegistry()); log.debug("Writer interceptor registry: {}", providerFactory.getServerWriterInterceptorRegistry()); log.debug("Injector factory: {}", providerFactory.getInjectorFactory()); log.debug("Instances: {}", providerFactory.getInstances()); log.debug("Exception mappers: {}", providerFactory.getExceptionMappers()); } }
protected void doStart(URL url) { // TODO jetty will by default enable keepAlive so the xml config has no effect now httpServer = httpBinder.bind(url, new RestHandler()); ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort()); if (servletContext == null) { servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT); } if (servletContext == null) { throw new RpcException("No servlet context found. If you are using server='servlet', " + "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml"); } servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment); try { dispatcher.init(new SimpleServletConfig(servletContext)); } catch (ServletException e) { throw new RpcException(e); } }
@Override protected void doStart(URL url) { // TODO jetty will by default enable keepAlive so the xml config has no effect now httpServer = httpBinder.bind(url, new RestHandler()); ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort()); if (servletContext == null) { servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT); } if (servletContext == null) { throw new RpcException("No servlet context found. If you are using server='servlet', " + "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml"); } servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment); try { dispatcher.init(new SimpleServletConfig(servletContext)); } catch (ServletException e) { throw new RpcException(e); } }
protected void doStart(URL url) { // TODO jetty will by default enable keepAlive so the xml config has no effect now httpServer = httpBinder.bind(url, new RestHandler()); ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort()); if (servletContext == null) { servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT); } if (servletContext == null) { throw new RpcException("No servlet context found. If you are using server='servlet', " + "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml"); } servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment); try { dispatcher.init(new SimpleServletConfig(servletContext)); } catch (ServletException e) { throw new RpcException(e); } }
@Override protected void doStart(URL url) { // TODO jetty will by default enable keepAlive so the xml config has no effect now httpServer = httpBinder.bind(url, new RestHandler()); ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort()); if (servletContext == null) { servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT); } if (servletContext == null) { throw new RpcException("No servlet context found. If you are using server='servlet', " + "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml"); } servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment); try { dispatcher.init(new SimpleServletConfig(servletContext)); } catch (ServletException e) { throw new RpcException(e); } }
@Override protected void doStart(URL url) { // TODO jetty will by default enable keepAlive so the xml config has no effect now httpServer = httpBinder.bind(url, new RestHandler()); ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort()); if (servletContext == null) { servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT); } if (servletContext == null) { throw new RpcException("No servlet context found. If you are using server='servlet', " + "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml"); } servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment); try { dispatcher.init(new SimpleServletConfig(servletContext)); } catch (ServletException e) { throw new RpcException(e); } }