fixed bug 17075: Automatic deploy in tomcat 7
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 26 Jul 2011 13:13:53 +0200
changeset 13271 fad122168625
parent 13270 2553ed200a32
child 13272 b00b4f79005e
fixed bug 17075: Automatic deploy in tomcat 7

-Updated Openbravo.properties to explain differences between Tomcat 6 and 7
-Updated documentation: http://wiki.openbravo.com/wiki/Openbravo.properties
-ant dagnostic task now uses context.url to determine server url rather than tomcat.manager.url
config/Openbravo.properties.template
src-util/diagnostic/src/org/openbravo/utils/ServerConnection.java
--- a/config/Openbravo.properties.template	Tue Jul 26 10:12:23 2011 +0200
+++ b/config/Openbravo.properties.template	Tue Jul 26 13:13:53 2011 +0200
@@ -35,7 +35,8 @@
 # Don't change this unless you know what you are doing
 web.url=@actual_url_context@/web
 
-# Full URL of the context, *only* used by the Web Services installation
+# Full URL of the context, *only* used by the Web Services installation 
+# and diagnostic task
 context.url=http://localhost:8080/openbravo
 
 # Absolute path to the attachments directory
@@ -83,8 +84,13 @@
 ##################
 # Tomcat manager #
 ##################
-#
+
+# From Tomcat 7 manager url is host/manager/text. In previous versions it is
+# host/manager
 tomcat.manager.url=http://localhost:8080/manager
+
+# From Tomcat 7 this user must have manager-script role access. In previous
+# versions. In previous versions it must have manager role access.
 tomcat.manager.username=admin
 tomcat.manager.password=admin
 
--- a/src-util/diagnostic/src/org/openbravo/utils/ServerConnection.java	Tue Jul 26 10:12:23 2011 +0200
+++ b/src-util/diagnostic/src/org/openbravo/utils/ServerConnection.java	Tue Jul 26 13:13:53 2011 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,7 +32,7 @@
 
   private URL getUrl(String action, String additionalParameters) throws MalformedURLException {
     String serverUrl = new PropertiesManager("config/Openbravo.properties")
-        .getProperty("tomcat.manager.url");
+        .getProperty("context.url");
     serverUrl = serverUrl.substring(0, serverUrl.lastIndexOf('/'));
     return new URL(serverUrl + "/OpenbravoDiagnostics/Check.html?Command=" + action
         + additionalParameters);