// the usual gateway.xml, etc.
DeploymentContext context;
Map<String,List<ProviderDeploymentContributor>> providers = new HashMap<String,List<ProviderDeploymentContributor>>();
Map<String,List<ServiceDeploymentContributor>> services = new HashMap<String,List<ServiceDeploymentContributor>>();
context = createDeploymentContext( config, "forward", topology, providers, services);
WebAppDescriptor wad = context.getWebAppDescriptor();
String servletName = context.getTopology().getName();
String servletClass = GatewayForwardingServlet.class.getName();
wad.createServlet().servletName( servletName ).servletClass( servletClass );
wad.createServletMapping().servletName( servletName ).urlPattern( "/*" );
ServletType<WebAppDescriptor> servlet = findServlet( context, context.getTopology().getName() );
servlet.createInitParam()
.paramName( DEFAULT_APP_REDIRECT_CONTEXT_PATH )
.paramValue( config.getDefaultAppRedirectPath() );
writeDeploymentDescriptor(context);