FileDocCategorySizeDatePackage
InstallTask.javaAPI DocGlassfish v2 API4341Fri May 04 22:31:52 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: 1.3 $ $Date: 2007/05/05 05:31:52 $
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;