Examples of WarArchive


Examples of org.apache.cactus.integration.ant.deployment.WarArchive

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

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new WarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertTrue(webXml.hasServlet("JspRedirector"));
        assertEquals("/test/JspRedirector",
            webXml.getServletMappings("JspRedirector").next());
        assertTrue(webXml.hasServlet("JspRedirectorSecure"));
        assertEquals("/test/JspRedirectorSecure",
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

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

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new WarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertTrue(webXml.hasFilter("FilterRedirector"));
        assertEquals("/test/FilterRedirector",
            webXml.getFilterMappings("FilterRedirector").next());
        assertTrue(webXml.hasFilter("FilterRedirectorSecure"));
        assertEquals("/test/FilterRedirectorSecure",
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

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

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new WarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertTrue(webXml.hasServlet("ServletRedirectorSecure"));
        assertEquals("/ServletRedirectorSecure",
            webXml.getServletMappings("ServletRedirectorSecure").next());
        assertTrue(webXml.hasSecurityRole("test"));
        assertTrue(webXml.hasSecurityRole("cactus"));
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

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

        File destFile = getProject().resolveFile("work/destfile.war");
        WarArchive destWar = new WarArchive(destFile);
        WebXml webXml = destWar.getWebXml();
        assertEquals("FORM", webXml.getLoginConfigAuthMethod());
    }
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

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

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

     *         parsed
     */
    private WebXml getOriginalWebXml() throws BuildException
    {
        // Open the archive as JAR file and extract the deployment descriptor
        WarArchive war = null;
        try
        {
            war = new WarArchive(this.srcFile);
            WebXml webXml = war.getWebXml();
            if (webXml == null)
            {
                throw new BuildException(
                    "The source file does not contain a deployment descriptor");
            }
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

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

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

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

    public void testDefaultRedirectors22Doctype() 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

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

    public void testDefaultRedirectors23Doctype() 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

Examples of org.apache.cactus.integration.ant.deployment.WarArchive

    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
TOP
Copyright © 2018 www.massapi.com. 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.