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

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


                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


         waitForApplicationTargetState(deployName, true, containerConfiguration.getAppDeployTimeout());

         // Return metadata on how to contact the deployed application
         ProtocolMetaData metaData = new ProtocolMetaData();
         HTTPContext httpContext = new HTTPContext("localhost", containerConfiguration.getHttpPort());
         httpContext.add(new Servlet("ArquillianServletRunner", deployName));
         metaData.addContext(httpContext);

         if (log.isLoggable(Level.FINER)) {
            log.exiting(className, "deploy");
         }
View Full Code Here


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

            HTTPContext httpContext = new HTTPContext("localhost", 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

            if (archive instanceof WebArchive) {
                arquillianServlet = "/" + getArchiveNameWithoutExtension(archive);
            } else {
                arquillianServlet = "/arquillian-protocol";
            }
            httpContext.add(new Servlet("ArquillianServletRunner", arquillianServlet));

            // we should probably get all servlets and add them to the context
            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

            ObjectName[] servletRuntimes = findServletRuntimes(wlServerRuntime, deploymentName);
            for (ObjectName servletRuntime : servletRuntimes)
            {
               String servletName = (String) connection.getAttribute(servletRuntime, "ServletName");
               String servletContextRoot = (String) connection.getAttribute(servletRuntime, "ContextPath");
               httpContext.add(new Servlet(servletName, servletContextRoot));
            }
         }
      }
View Full Code Here

         final HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(),
               configuration.getBindHttpPort());

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

         return new ProtocolMetaData().addContext(httpContext);
      }
      catch (Exception e)
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

         Set<ObjectName> servletObjects = connection.queryNames(new ObjectName(
               "*:*,J2EEApplication=none,J2EEServer=none,j2eeType=Servlet,name=" + servletName), null);
         for (ObjectName servletObject : servletObjects)
         {
            String contextRoot = servletObject.getKeyProperty("WebModule").replaceAll(".*\\/(.*)", "$1");
            httpContext.add(new Servlet(servletName, contextRoot));
         }
      }
   }
View Full Code Here

         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

        HTTPContext httpContext = new HTTPContext(host, port);
        Map<String, String> servlets = extractServlets(archive);
        for (Map.Entry<String, String> entry : servlets.entrySet()) {
            String name = entry.getKey();
            String contextPath = entry.getValue();
            httpContext.add(new Servlet(name, contextPath));
        }
        return new ProtocolMetaData().addContext(httpContext);
    }
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.