Package org.codehaus.cargo.module.webapp

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


        String resourceName = "/" + theClassName.replace('.', '/') + ".class";
        if (this.srcFile != null)
        {
            try
            {
                WarArchive srcWar = new DefaultWarArchive(srcFile);
                if (srcWar.containsClass(theClassName))
                {
                    log("The " + theDescription + " JAR is already present in "
                        + "the WAR", Project.MSG_VERBOSE);
                    return;
                }
View Full Code Here


    {
        // Open the archive as JAR file and extract the deployment descriptor
        WarArchive war = null;
        try
        {
            war = new DefaultWarArchive(this.srcFile);
            WebXml webXml = war.getWebXml();
            return webXml;
        }
        catch (SAXException e)
        {
View Full Code Here

        String resourceName = "/" + theClassName.replace('.', '/') + ".class";
        if (this.srcFile != null)
        {
            try
            {
                WarArchive srcWar = new DefaultWarArchive(
                    new FileInputStream(srcFile));
                if (srcWar.containsClass(theClassName))
                {
                    log("The " + theDescription + " JAR is already present in "
                        + "the WAR", Project.MSG_VERBOSE);
                    return;
                }
View Full Code Here

    {
        // Open the archive as JAR file and extract the deployment descriptor
        WarArchive war = null;
        try
        {
            war = new DefaultWarArchive(new FileInputStream(this.srcFile));
            WebXml webXml = war.getWebXml();
            return webXml;
        }
        catch (SAXException e)
        {
View Full Code Here

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

        File destFile = getProject().resolveFile("target/work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile.getAbsolutePath());
        WebXml webXml = destWar.getWebXml();
        assertNull("The web.xml should not have a version specified",
            webXml.getDocument().getDoctype());
        assertServletMapping(webXml,
            "org.apache.cactus.server.ServletTestRedirector",
            "ServletRedirector",
View Full Code Here

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

        File destFile = getProject().resolveFile("target/work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile.getAbsolutePath());
        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 testDefaultRedirectorsNewWar22() throws Exception
    {
        executeTestTarget();

        File destFile = getProject().resolveFile("target/work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile.getAbsolutePath());
        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 testCustomServletRedirectorMapping() throws Exception
    {
        executeTestTarget();
        File destFile = getProject().resolveFile("target/work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile.getAbsolutePath());
        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("target/work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile.getAbsolutePath());
        WebXml webXml = destWar.getWebXml();
        assertJspMapping(webXml, "/jspRedirector.jsp", "JspRedirector",
            "/test/jspRedirector");
    }
View Full Code Here

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

        File destFile = getProject().resolveFile("target/work/destfile.war");
        WarArchive destWar = new DefaultWarArchive(destFile.getAbsolutePath());
        WebXml webXml = destWar.getWebXml();
        assertFilterMapping(webXml,
            "org.apache.cactus.server.FilterTestRedirector",
            "FilterRedirector",
            "/test/filterRedirector");
    }
View Full Code Here

TOP

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

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.