InstallTaskpublic class InstallTask extends AbstractCatalinaTask Ant task that implements the /install command, supported by the
Tomcat manager application. |
Fields Summary |
---|
protected String | configURL of the context configuration file for this application, if any. | protected String | pathThe context path of the web application we are managing. | protected String | warURL of the web application archive (WAR) file, or the unpacked directory
containing this application, if any. |
Methods Summary |
---|
public void | execute()Execute the requested operation.
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.String | getConfig()
return (this.config);
| public java.lang.String | getPath()
return (this.path);
| public java.lang.String | getWar()
return (this.war);
| public void | setConfig(java.lang.String config)
this.config = config;
| public void | setPath(java.lang.String path)
this.path = path;
| public void | setWar(java.lang.String war)
this.war = war;
|
|