Author: kfujino
Date: Thu Mar 27 09:42:15 2014
New Revision: 1582234
URL: http://svn.apache.org/r1582234
Log:
Ensure that "name" request parameter is used as a application base of host if
"webapps" request parameter is not set when adding host in HostManager
Application.
Modified:
tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java
tomcat/trunk/webapps/docs/changelog.xml
Modified:
tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java?rev=1582234&r1=1582233&r2=1582234&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java
Thu Mar 27 09:42:15 2014
@@ -353,11 +353,11 @@ public class HostManagerServlet
// Validate and create appBase
File appBaseFile = null;
File file = null;
- if (appBase == null || appBase.length() == 0) {
- file = new File(name);
- } else {
- file = new File(appBase);
+ String applicationBase = appBase;
+ if (applicationBase == null || applicationBase.length() == 0) {
+ applicationBase = name;
}
+ file = new File(applicationBase);
if (!file.isAbsolute())
file = new File(engine.getCatalinaBase(), file.getPath());
try {
@@ -401,7 +401,7 @@ public class HostManagerServlet
}
StandardHost host = new StandardHost();
- host.setAppBase(appBase);
+ host.setAppBase(applicationBase);
host.setName(name);
host.addLifecycleListener(new HostConfig());
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1582234&r1=1582233&r2=1582234&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Mar 27 09:42:15 2014
@@ -67,6 +67,11 @@
Add Support for <code>copyXML</code> attribute of Host to Host Manager.
(kfujino)
</fix>
+ <fix>
+ Ensure that "name" request parameter is used as a application base of
+ host if "webapps" request parameter is not set when adding host in
+ HostManager Application. (kfujino)
+ </fix>
</changelog>
</subsection>
<subsection name="Other">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]