Author: ate
Date: Fri Aug 21 14:29:28 2009
New Revision: 806569
URL: http://svn.apache.org/viewvc?rev=806569&view=rev
Log:
Don't add Tomcat Context path and/or docBase attributes unnecessarily
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedContextRewriter.java
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedContextRewriter.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedContextRewriter.java?rev=806569&r1=806568&r2=806569&view=diff
==============================================================================
---
portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedContextRewriter.java
(original)
+++
portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedContextRewriter.java
Fri Aug 21 14:29:28 2009
@@ -54,18 +54,24 @@
root = document.getDocumentElement();
}
- // set Context path
- String pathAttribute = root.getAttribute("path");
- if ((pathAttribute.equals("")) || !pathAttribute.equals("/" +
portletApplication))
+ if (root.hasAttribute("path"))
{
- root.setAttribute("path", "/" + portletApplication);
+ // set Context path
+ String pathAttribute = root.getAttribute("path");
+ if ((pathAttribute.equals("")) ||
!pathAttribute.equals("/" + portletApplication))
+ {
+ root.setAttribute("path", "/" + portletApplication);
+ }
}
- // set Context docBase
- String docBaseAttribute = root.getAttribute("docBase");
- if ((docBaseAttribute.equals("")) ||
!docBaseAttribute.equals(portletApplication))
+ if (root.hasAttribute("docBase"))
{
- root.setAttribute("docBase", portletApplication);
+ // set Context docBase
+ String docBaseAttribute = root.getAttribute("docBase");
+ if ((docBaseAttribute.equals("")) ||
!docBaseAttribute.equals(portletApplication))
+ {
+ root.setAttribute("docBase", portletApplication);
+ }
}
}
catch (Exception e)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]