• R/O
  • SSH
  • HTTPS

pal: Commit


Commit MetaInfo

Revision1601 (tree)
Zeit2008-12-10 14:31:22
Autorsone

Log Message

patch 'r704859: Using \ characters will corrupt the path when used as (Spring expanded) variables'

Ändern Zusammenfassung

Diff

--- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java (revision 1600)
+++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java (revision 1601)
@@ -63,6 +63,10 @@
6363 public SpringComponentManager(String[] bootConfigs, String[] appConfigs,
6464 ServletContext servletContext, String appRoot)
6565 {
66+ // Using \ characters will corrupt the path when used as (Spring expanded) variables
67+ // making sure default (Java) path separators are used which somehow always work, even on Windows platform.
68+ appRoot = appRoot.replace('\\', '/');
69+
6670 File appRootDir = new File(appRoot);
6771 System.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY,
6872 appRootDir.getAbsolutePath());
@@ -105,6 +109,10 @@
105109 public SpringComponentManager(String[] bootConfigs, String[] appConfigs,
106110 String appRoot)
107111 {
112+ // Using \ characters will corrupt the path when used as (Spring expanded) variables
113+ // making sure default (Java) path separators are used which somehow always work, even on Windows platform.
114+ appRoot = appRoot.replace('\\', '/');
115+
108116 PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
109117 Properties p = new Properties();
110118 // p.setProperty(APPLICATION_ROOT_KEY,appRootDir.getAbsolutePath());
Show on old repository browser