FileDocCategorySizeDatePackage
InstallTask.javaAPI DocApache Tomcat 6.0.143265Fri Jul 20 04:20:30 BST 2007org.apache.catalina.ant

InstallTask

public class InstallTask extends AbstractCatalinaTask
Ant task that implements the /install command, supported by the Tomcat manager application.
author
Craig R. McClanahan
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
since
4.1
deprecated
Replaced by DeployTask

Fields Summary
protected String
config
URL of the context configuration file for this application, if any.
protected String
path
The context path of the web application we are managing.
protected String
war
URL of the web application archive (WAR) file, or the unpacked directory containing this application, if any.
Constructors Summary
Methods Summary
public voidexecute()
Execute the requested operation.

exception
BuildException if an error occurs


        super.execute();
        if (path == null) {
            throw new BuildException
                ("Must specify 'path' attribute");
        }
        if ((config == null) && (war == null)) {
            throw new BuildException
                ("Must specify at least one of 'config' and 'war'");
        }
        StringBuffer sb = new StringBuffer("/install?path=");
        sb.append(URLEncoder.encode(this.path));
        if (config != null) {
            sb.append("&config=");
            sb.append(URLEncoder.encode(config));
        }
        if (war != null) {
            sb.append("&war=");
            sb.append(URLEncoder.encode(war));
        }
        execute(sb.toString());

    
public java.lang.StringgetConfig()


       
        return (this.config);
    
public java.lang.StringgetPath()


       
        return (this.path);
    
public java.lang.StringgetWar()


       
        return (this.war);
    
public voidsetConfig(java.lang.String config)

        this.config = config;
    
public voidsetPath(java.lang.String path)

        this.path = path;
    
public voidsetWar(java.lang.String war)

        this.war = war;