Package org.jboss.arquillian.container.spi.client.protocol.metadata

Examples of org.jboss.arquillian.container.spi.client.protocol.metadata.Servlet


    @Override
    protected HTTPContext locateHTTPContext(Method method) {
        final ModuleContext mc = locateModuleContext(method);
        HTTPContext context = new HTTPContext(mc.getHost(), mc.getPort());
        Servlet servlet = new Servlet(ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME, "");
        context.add(servlet);
        return context;
    }
View Full Code Here


         String contextPath = standardContext.getPath();
         HTTPContext httpContext = new HTTPContext(bindAddress, bindPort);

         for (String mapping : standardContext.findServletMappings())
         {
            httpContext.add(new Servlet(standardContext.findServletMapping(mapping), contextPath));
         }

         return new ProtocolMetaData().addContext(httpContext);
      }
      catch (Exception e)
View Full Code Here

      ctx.export(config);
      doStart((GwtArchive) archive);
      WebAppContext wctx = devMode.getWebAppContext();
      HTTPContext httpContext = new HTTPContext(config.getBindAddress(), config.getPort());
          for(ServletHolder servlet : wctx.getServletHandler().getServlets())
              httpContext.add(new Servlet(servlet.getName(), wctx.getContextPath()));
      return new ProtocolMetaData().addContext(httpContext).addContext(config);
    } catch (Exception e) {
      throw new DeploymentException("Could not deploy " + archive.getName(), e);
    }
  }
View Full Code Here

      String contextRoot = null; //protocolConfiguration.getContextRoot();
     
      if( metaData.hasContext(HTTPContext.class))
      {
         HTTPContext context = metaData.getContext(HTTPContext.class);
         Servlet servlet = context.getServletByName(ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME);
         if(servlet != null)
         {
            // use the context where the Arquillian servlet is found
            if(address == null)
            {
               address = context.getHost();
            }
            if(port == null)
            {
               port = context.getPort();
            }
            contextRoot = servlet.getContextRoot();
         }
         else
         {
            throw new IllegalArgumentException(
                  ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME + " not found. " +
View Full Code Here

      {
         HTTPContext context = metaData.getContext(HTTPContext.class);
         if(resource.value() != null && resource.value() != ArquillianResource.class)
         {
            // TODO: we need to check for class. Not all containers have ServletClass available.
            Servlet servlet = context.getServletByName(resource.value().getSimpleName());
            if( servlet == null)
            {
               servlet = context.getServletByName(resource.value().getName());
               //throw new RuntimeException("No Servlet named " + resource.value().getSimpleName() + " found in metadata");
            }
View Full Code Here

                    contextRoot = resolveWebModuleContextRoot(componentName, children);
                    resolveWebModuleSubComponents(name, componentName, contextRoot, httpContext);

                } else if ( SERVLET.equals(subComponent.getValue()) ) {

                    httpContext.add(new Servlet(componentName, contextRoot));
                }
            }
        }

      return httpContext;
View Full Code Here

   
    String componentName;
    for (Map.Entry subComponent : subComponents.entrySet())
        {
          componentName = subComponent.getKey().toString();
        httpContext.add(new Servlet(componentName, context));
        }
  } 
View Full Code Here

        try {
            HTTPContext httpContext = new HTTPContext(containerConfig.getBindAddress(), containerConfig.getBindHttpPort());
            AppContext context = server.getAppContext();
            WebAppContextUtil wctx = new WebAppContextUtil(context.getContainerContext());
            for (WebAppContextUtil.ServletHolder servlet : wctx.getServlets()) {
                httpContext.add(new Servlet(servlet.getName(), wctx.getContextPath()));
            }
            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
            teardown();
            shutdownServer();
View Full Code Here

            });

        URI contextURI = getAppURI();

        HTTPContext context = new HTTPContext("openshift", contextURI.getHost(), getPort(contextURI));
        Servlet servlet = new Servlet("deployment", contextPath);
        context.add(servlet);

        ProtocolMetaData metaData = new ProtocolMetaData();
        metaData.addContext(context);
View Full Code Here

                if (webSubSystem.isDefined() && webSubSystem.hasDefined("context-root")) {
                    final String contextName = webSubSystem.get("context-root").asString();
                    if (webSubSystem.hasDefined(SERVLET)) {
                        for (final ModelNode servletNode : webSubSystem.get(SERVLET).asList()) {
                            for (final String servletName : servletNode.keys()) {
                                context.add(new Servlet(servletName, toContextName(contextName)));
                            }
                        }
                    }
                    /*
                     * This is a WebApp, it has some form of webcontext whether it has a Servlet or not. AS7 does not expose jsp
                     * / default servlet in mgm api
                     */
                    context.add(new Servlet("default", toContextName(contextName)));
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.client.protocol.metadata.Servlet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.