src/main/java/cloud/tamacat/httpd/jetty/JettyDeployment.java
public void deploy(ServiceConfig serviceConfig) {
		setWebapps(webapps);
		LOG.debug("port=" + port + ", config=" + serviceConfig);
		server = JettyManager.getInstance(hostname, port);

		try {
			String contextRoot = serviceConfig.getPath().replaceAll("/$", "");
			if (StringUtils.isNotEmpty(contextPath)) {
				contextRoot = contextPath;
			}
			// check already add webapp.

			File baseDir = new File(getWebapps() + contextRoot);
			WebAppContext context = new WebAppContext(baseDir.getAbsolutePath(), contextRoot);
			context.setClassLoader(getClassLoader());

			HttpConfiguration httpConfig = new HttpConfiguration();
			httpConfig.addCustomizer(new ForwardedRequestCustomizer());
			ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(httpConfig));
			connector.setHost(hostname);
			connector.setPort(port);
	        server.setConnectors(new Connector[] { connector });

			server.setHandler(context);

			LOG.info("Jetty port=" + port + ", path=" + contextRoot + ", dir=" + baseDir.getAbsolutePath());
		} catch (Exception e) {
			LOG.warn(e.getMessage(), e);
		}
	}
/**
	 * Deployment Web Applications for Jetty Embedded
	 * 
	 * @param serviceUrl
	 */
Deployment Web Applications for Jetty Embedded

@param serviceUrl
Deployment Web Applications for Jetty Embedded @param serviceUrl
public void deploy(ServiceConfig serviceConfig) {
		setWebapps(webapps);
		LOG.debug("port=" + port + ", config=" + serviceConfig);
		server = JettyManager.getInstance(hostname, port);
		try {
			String contextRoot = serviceConfig.getPath().replaceAll("/$", "");
			if (StringUtils.isNotEmpty(contextPath)) {
				contextRoot = contextPath;
			}
			File baseDir = new File(getWebapps() + contextRoot);
			WebAppContext context = new WebAppContext(baseDir.getAbsolutePath(), contextRoot);
			context.setClassLoader(getClassLoader());
			HttpConfiguration httpConfig = new HttpConfiguration();
			httpConfig.addCustomizer(new ForwardedRequestCustomizer());
			ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(httpConfig));
			connector.setHost(hostname);
			connector.setPort(port);
	        server.setConnectors(new Connector[] { connector });
			server.setHandler(context);
			LOG.info("Jetty port=" + port + ", path=" + contextRoot + ", dir=" + baseDir.getAbsolutePath());
		} catch (Exception e) {
			LOG.warn(e.getMessage(), e);
		}
	}
public void deploy ( ServiceConfig serviceConfig ) { setWebapps ( webapps ) ; LOG . debug ( "port=" + port + ", config=" + serviceConfig ) ; server = JettyManager . getInstance ( hostname , port ) ; try { String contextRoot = serviceConfig . getPath ( ) . replaceAll ( "/$" , "" ) ; if ( StringUtils . isNotEmpty ( contextPath ) ) { contextRoot = contextPath ; } File baseDir = new File ( getWebapps ( ) + contextRoot ) ; WebAppContext context = new WebAppContext ( baseDir . getAbsolutePath ( ) , contextRoot ) ; context . setClassLoader ( getClassLoader ( ) ) ; HttpConfiguration httpConfig = new HttpConfiguration ( ) ; httpConfig . addCustomizer ( new ForwardedRequestCustomizer ( ) ) ; ServerConnector connector = new ServerConnector ( server , new HttpConnectionFactory ( httpConfig ) ) ; connector . setHost ( hostname ) ; connector . setPort ( port ) ; server . setConnectors ( new Connector [ ] { connector } ) ; server . setHandler ( context ) ; LOG . info ( "Jetty port=" + port + ", path=" + contextRoot + ", dir=" + baseDir . getAbsolutePath ( ) ) ; } catch ( Exception e ) { LOG . warn ( e . getMessage ( ) , e ) ; } }
Deployment Web Applications for Jetty Embedded
Deployment Web Applications for Jetty Embedded
// check already add webapp.