Package org.codehaus.cargo.module.webapp

Examples of org.codehaus.cargo.module.webapp.WarArchive


    {
        ApplicationXml applicationXml = theEar.getApplicationXml();
        for (Iterator i = applicationXml.getWebModuleUris(); i.hasNext();)
        {
            String webUri = (String) i.next();
            WarArchive war = theEar.getWebModule(webUri);
            if ((war != null)
                && (WarParser.parseServletRedirectorMapping(war) != null))
            {
                return webUri;
            }
View Full Code Here


     *
     * @throws Exception If an unexpected error occurs
     */
    public void testContainsClassInWebinfClasses() throws Exception
    {
        WarArchive war = new DefaultWarArchive(getTestInput(
            "org/apache/cactus/integration/ant/deployment/containsclass.war").getAbsolutePath());
        assertTrue(war.containsClass("test.Test"));
    }
View Full Code Here

     *
     * @throws Exception If an unexpected error occurs
     */
    public void testContainsClassInWebinfLib() throws Exception
    {
        WarArchive war = new DefaultWarArchive(getTestInput(
            "org/apache/cactus/integration/ant/deployment/"
            + "containsclasslib.war").getAbsolutePath());
        assertTrue(war.containsClass("test.Test"));
    }
View Full Code Here

     *
     * @throws Exception If an unexpected error occurs
     */
    public void testContainsClassEmpty() throws Exception
    {
        WarArchive war = new DefaultWarArchive(getTestInput(
            "org/apache/cactus/integration/ant/deployment/empty.war").getAbsolutePath());
        assertTrue(!war.containsClass("test.Test"));
    }
View Full Code Here

       
        File destFile = getProject().resolveFile("work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile);
        ApplicationXml appXml = destEar.getApplicationXml();
        assertEquals("/cactus", appXml.getWebModuleContextRoot("cactus.war"));
        WarArchive cactusWar = destEar.getWebModule("cactus.war");
        WebXml webXml = cactusWar.getWebXml();
        assertNotNull(webXml.getServlet("ServletRedirector"));
    }
View Full Code Here

    {
        executeTestTarget();
       
        File destFile = getProject().resolveFile("work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile);
        WarArchive cactusWar = destEar.getWebModule("cactus.war");
       
        // test web.xml
        WebXml webXml = cactusWar.getWebXml();
        Iterator i = webXml.getElements(WebXmlTag.EJB_LOCAL_REF);
        assertEjbRef((Element) i.next(), "ejb/Session2", "Session",
                     "com.wombat.Session2", "com.wombat.Session2Home");
        assertEjbRef((Element) i.next(), "ejb/Entity1", "Entity",
                     "com.wombat.Entity1", "com.wombat.Entity1Home");
View Full Code Here

    public void testDefaultRedirectorsNewWar22() throws Exception
    {
        executeTestTarget();

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertEquals(WebXmlVersion.V2_2, webXml.getVersion());
        assertServletMapping(webXml,
            "org.apache.cactus.server.ServletTestRedirector",
            "ServletRedirector",
            "/ServletRedirector");
View Full Code Here

    public void testDefaultRedirectorsNewWar23() throws Exception
    {
        executeTestTarget();

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertEquals(WebXmlVersion.V2_3, webXml.getVersion());
        assertServletMapping(webXml,
            "org.apache.cactus.server.ServletTestRedirector",               
            "ServletRedirector",
            "/ServletRedirector");
View Full Code Here

    public void testCustomServletRedirectorMapping() throws Exception
    {
        executeTestTarget();

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertServletMapping(webXml,
            "org.apache.cactus.server.ServletTestRedirector",               
            "ServletRedirector",
            "/test/servletRedirector");
    }
View Full Code Here

    public void testCustomJspRedirectorMapping() throws Exception
    {
        executeTestTarget();

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertJspMapping(webXml, "/jspRedirector.jsp", "JspRedirector",
            "/test/jspRedirector");
    }
View Full Code Here

TOP

Related Classes of org.codehaus.cargo.module.webapp.WarArchive

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.