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 DefaultWarArchive(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 DefaultWarArchive(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 DefaultWarArchive(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 DefaultWarArchive(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 DefaultWarArchive(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 DefaultWarArchive(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

            {
                throw new BuildException("Could not find cactified web "
                    + "module in the [" + theDeployableFile + "] EAR.");
            }

            WarArchive warArchive = earArchive.getWebModule(webUri);
            if (warArchive == null)
            {
                throw new BuildException("Could not find the WAR [" + webUri
                    + "] in the [" + theDeployableFile + "] EAR.");
            }
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.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

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

            throw new BuildException("You must specify either the [warfile] or "
                + "the [earfile] attribute");
        }

        // Open the archive as JAR file and extract the deployment descriptor
        WarArchive war = null;
        String contextPath = null;
        try
        {
            if (this.warFile != null)
            {
                war = new WarArchive(this.warFile);
                contextPath = this.warFile.getName();
                int warIndex = contextPath.toLowerCase().lastIndexOf(".war");
                if (warIndex >= 0)
                {
                    contextPath = contextPath.substring(0, warIndex);
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.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) && (getServletRedirectorMapping(war) != null))
                {
                    return webUri;
                }
            }
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.