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

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


         webAppContextProducer.set(wctx);

         HTTPContext httpContext = new HTTPContext(containerConfig.getBindAddress(), containerConfig.getBindHttpPort());
         for(ServletHolder servlet : wctx.getServletHandler().getServlets())
         {
            httpContext.add(new Servlet(servlet.getName(), servlet.getContextPath()));
         }

         return new ProtocolMetaData()
            .addContext(httpContext);
View Full Code Here


    final Map<String, ServletInfo> servlets = deploymentInfo.getServlets();

    final Collection<ServletInfo> servletsInfo = servlets.values();

    for (ServletInfo servletInfo : servletsInfo) {
      httpContext.add(new Servlet(servletInfo.getName(),
          deploymentManager.getDeployment().getDeploymentInfo()
              .getContextPath()));
    }
    return httpContext;
  }
View Full Code Here

      Integer port = config.getPort();

      // TODO: can not set contextRoot in config, change to prefixContextRoot
      String contextRoot = null; //protocolConfiguration.getContextRoot();
     
      Servlet servlet = context.getServletByName(servletName);
      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(
              servletName + " not found. " +
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


            AppContext appContext = container.deploy(name, file);

            HTTPContext httpContext = new HTTPContext("0.0.0.0", configuration.getHttpPort());
            httpContext.add(new Servlet("ArquillianServletRunner", "/" + getArchiveNameWithoutExtension(archive)));
            beanManagerInstance.set(appContext.getBeanManager());
            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to deploy", e);
View Full Code Here

                }
            }

            HTTPContext httpContext = new HTTPContext(LOCALHOST, configuration.getHttpPort());
            if (archive instanceof WebArchive) {
              httpContext.add(new Servlet("ArquillianServletRunner", "/" + getArchiveNameWithoutExtension(archive)));
            } else {
              httpContext.add(new Servlet("ArquillianServletRunner", "/arquillian-protocol"));
            }
           
            // we should probably get all servlets and add them to the context
            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
View Full Code Here

                    if (clazz == null) {
                        continue;
                    }
                }

                httpContext.add(new Servlet(clazz, webApps.contextRoot));
                /*
                for (String mapping : servlet.mappings) {
                    httpContext.add(new Servlet(servlet.servletClass, startWithSlash(uniqueSlash(webApps.contextRoot, mapping))));

                }
View Full Code Here

            final HTTPContext httpContext = new HTTPContext(configuration.getHost(), configuration.getHttpPort());

            // Avoids "inconvertible types" error in windows build
            if (archiveName.endsWith(".war")) {
                httpContext.add(new Servlet("ArquillianServletRunner", "/" + getArchiveNameWithoutExtension(archive)));
            } else if (archiveName.endsWith(".ear") && appInfo.webApps.size() > 0) {
                final String contextRoot = System.getProperty("tomee.arquillian.ear.context", configuration.getWebContextToUseWithEars());
                if (contextRoot != null) {
                    httpContext.add(new Servlet("ArquillianServletRunner", ("/" + contextRoot).replace("//", "/")));
                } else {
                    for (final WebAppInfo web : appInfo.webApps) { // normally a single webapp is supported cause of arquillian resolution
                        httpContext.add(new Servlet("ArquillianServletRunner", ("/" + web.contextRoot).replace("//", "/")));
                    }
                }
            } else {
                httpContext.add(new Servlet("ArquillianServletRunner", "/arquillian-protocol")); // needs another jar to add the fake webapp
            }
            addServlets(httpContext, appInfo);

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

            this.container.deploy(name, file);
            final AppInfo info = this.container.getInfo(name);
            final String context = this.getArchiveNameWithoutExtension(archive);

            final HTTPContext httpContext = new HTTPContext(this.configuration.getHost(), this.configuration.getHttpPort());
            httpContext.add(new Servlet("ArquillianServletRunner", "/" + context));
            this.addServlets(httpContext, info);

            startCdiContexts(name); // ensure tests can use request/session scopes even if we don't have a request

            classLoader.set(SystemInstance.get().getComponent(ContainerSystem.class).getAppContext(info.appId).getClassLoader());
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.