Package com.simoncat.net

Examples of com.simoncat.net.HttpClient


    //recuperar los datos del server
     //Server server = new Server();

    //verificar si la aplicasion esta corriendo?
    ////http://localhost:8080/manager/list
    HttpClient hc1 = new HttpClient("localhost",8080,"tomcat","admin","");
    boolean lb = hc1.appIsRunning("Binary");
    boolean ub=false;
    boolean db=false;
    if(lb){
      // autenticar y undeploy la aplicacion en el tomcat.
      ////http://localhost:8080/manager/undeploy?path=/Binary
      String undeploy = "http://localhost:8080/manager/undeploy?path=/Binary";
           HttpClient hc2 = new HttpClient("localhost",8080,"tomcat","admin",undeploy);
       ub=hc2.execute();
    }
        //Copy WAR
    //confirmar upload 
   
    if((lb && ub) || (!lb) ){
          //Deploy WAR       
        //enviar comando al tomcat 
      ////http://localhost:8080/manager/deploy?path=/Binary&war=file:/tmp/Binary.war 
       String deploy = "http://localhost:8080/manager/deploy?path=/Binary&war=file:/tmp/Binary.war";
           HttpClient hc3 = new HttpClient("localhost",8080,"tomcat","admin",deploy);
       db=hc3.execute();
    }

    fso = new FinalScreenOutput();
          fso.setPageTitle    ("Upload-Deploy War[Finished]");
View Full Code Here


    }
   

    //verificar si la aplicasion esta corriendo?
    ////http://localhost:8080/manager/list
    HttpClient hc1 = new HttpClient(ip,port,tomcatUsr,tomcatPwd,"");
    boolean lb = hc1.appIsRunning(appName);
    boolean ub=false;
    boolean db=false;
    if(lb && transferFileOK){
      // autenticar y undeploy la aplicacion en el tomcat.
      ////http://localhost:8080/manager/undeploy?path=/Binary
      String undeploy = "http://"+ip+":"+port+"/manager/undeploy?path=/"+appName;
        HttpClient hc2 = new HttpClient(ip,port,tomcatUsr,tomcatPwd,undeploy);
       ub=hc2.execute();
    }
     
   
    if(((lb && ub) || (!lb) ) && transferFileOK ){
        //Deploy WAR       
       //enviar comando al tomcat 
      ////http://localhost:8080/manager/deploy?path=/Binary&war=file:/tmp/Binary.war 
       String deploy = "http://"+ip+":"+port+"/manager/deploy?path=/"+appName+"&war=file:/tmp/"+warName;
        HttpClient hc3 = new HttpClient(ip,port,tomcatUsr,tomcatPwd,deploy);
       db=hc3.execute();
    }

    //fso = new FinalScreenOutput();
          //fso.setPageTitle("Upload-Deploy War[Finished]");
                //fso.setMessage       ("WAR deployed sucessfully!"+ "It was Running:"+lb+" Undeploy:"+ub+" deploy:"+db);
View Full Code Here

TOP

Related Classes of com.simoncat.net.HttpClient

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.