Package org.apache.tomcat.maven.common.deployer

Examples of org.apache.tomcat.maven.common.deployer.TomcatManager.deploy()


        throws Exception
    {
        uploadServlet.uploadedResources.clear();
        TomcatManager tomcatManager = new TomcatManager( new URL( "http://localhost:" + this.port + "/foo/bar" ) );
        TomcatManagerResponse response =
            tomcatManager.deploy( "foo", new File( getBasedir(), "src/test/resources/test.txt" ) );

        assertEquals( 200, response.getStatusCode() );

        assertEquals( 1, uploadServlet.uploadedResources.size() );
        assertEquals( "/foo/bar/deploy", uploadServlet.uploadedResources.get( 0 ).requestUri );
View Full Code Here


        uploadServlet.uploadedResources.clear();
        TomcatManager tomcatManager =
            new TomcatManager( new URL( "http://localhost:" + this.redirectPort + "/foo/bar" ) );
        redirectServlet.redirectPath = "http://localhost:" + this.port + "/foo/bar/redirected";
        TomcatManagerResponse response =
            tomcatManager.deploy( "foo", new File( getBasedir(), "src/test/resources/test.txt" ) );

        assertEquals( 200, response.getStatusCode() );

        assertEquals( "no request to redirect servlet", 1, redirectServlet.uploadedResources.size() );
        assertEquals( "/foo/bar/deploy", redirectServlet.uploadedResources.get( 0 ).requestUri );
View Full Code Here

        uploadServlet.uploadedResources.clear();
        TomcatManager tomcatManager =
            new TomcatManager( new URL( "http://localhost:" + this.redirectPort + "/foo/bar" ) );
        redirectServlet.redirectPath = "redirectrelative/foo";
        TomcatManagerResponse response =
            tomcatManager.deploy( "foo", new File( getBasedir(), "src/test/resources/test.txt" ) );

        assertEquals( 200, response.getStatusCode() );

        assertEquals( "no request to redirect servlet", 2, redirectServlet.uploadedResources.size() );
        assertEquals( "/foo/bar/deploy", redirectServlet.uploadedResources.get( 0 ).requestUri );
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.