Author: markt Date: Sat Dec 1 10:26:13 2007 New Revision: 600177 URL: http://svn.apache.org/viewvc?rev=600177&view=rev Log: Fix bug 43611. Provide an error message if user tries to upload a war for a context defined in server.xml rather than failing silently.
Modified: tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java?rev=600177&r1=600176&r2=600177&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java Sat Dec 1 10:26:13 2007 @@ -228,6 +228,12 @@ path = "/" + basename; } + if ((host.findChild(path) != null) && !isDeployed(path)) { + message = sm.getString + ("htmlManagerServlet.deployUploadInServerXml", war); + break; + } + if (!isServiced(path)) { addServiced(path); try { Modified: tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties?rev=600177&r1=600176&r2=600177&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties Sat Dec 1 10:26:13 2007 @@ -38,6 +38,7 @@ htmlManagerServlet.deployUpload=WAR file to deploy htmlManagerServlet.deployUploadFail=FAIL - Deploy Upload Failed, Exception: {0} htmlManagerServlet.deployUploadFile=Select WAR file to upload +htmlManagerServlet.deployUploadInServerXml=FAIL - War file \"{0}\" cannot be uploaded if context is defined in server.xml htmlManagerServlet.deployUploadNotWar=FAIL - File uploaded \"{0}\" must be a .war htmlManagerServlet.deployUploadNoFile=FAIL - File upload failed, no file htmlManagerServlet.deployUploadWarExists=FAIL - War file \"{0}\" already exists on server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]