[
https://issues.apache.org/jira/browse/OFBIZ-6183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14369302#comment-14369302
]
Deepak Dixit commented on OFBIZ-6183:
-------------------------------------
Fixed string index out of range exception at r#1667733 in trunk and back ported
changes to 14.12 as well.
An warning related to "/" will display on console
{code}
[java] 2015-03-19 18:18:48,139 |catalina-startup-1 |StandardContext
|W| A context path must either be an empty string or start with a '/'
and do not end with a '/'. The path [/] does not meet these criteria and has
been changed to []
{code}
To fix this warning we have two options:
Option 1: In this case we need to use mount-point=“” if we want to mount
application on "/" (preferable same as tomcat contextPath behavior)
{code}
Index: framework/base/src/org/ofbiz/base/component/ComponentConfig.java
===================================================================
--- framework/base/src/org/ofbiz/base/component/ComponentConfig.java
(revision 1667731)
+++ framework/base/src/org/ofbiz/base/component/ComponentConfig.java
(working copy)
@@ -847,12 +847,8 @@
this.description = description;
this.server = element.getAttribute("server");
String mountPoint = element.getAttribute("mount-point");
- if (mountPoint.isEmpty()) {
- // default mount point is name if none specified
- mountPoint = this.name;
- }
// check the mount point and make sure it is properly formatted
- if (!"/".equals(mountPoint)) {
+ if (!mountPoint.isEmpty()) {
if (!mountPoint.startsWith("/")) {
mountPoint = "/" + mountPoint;
{code}
Options2: In this case we don’t need to make any changes in webapp definition
{code}
Index: framework/base/src/org/ofbiz/base/component/ComponentConfig.java
===================================================================
--- framework/base/src/org/ofbiz/base/component/ComponentConfig.java(revision
1667692)
+++ framework/base/src/org/ofbiz/base/component/ComponentConfig.java(working
copy)
@@ -862,6 +862,8 @@
}
mountPoint = mountPoint + "*";
}
+ } else {
+ mountPoint = "";
}
this.mountPoint = mountPoint;
if (this.mountPoint.endsWith("/*")) {
{code}
> Error when web app has mount point /
> ------------------------------------
>
> Key: OFBIZ-6183
> URL: https://issues.apache.org/jira/browse/OFBIZ-6183
> Project: OFBiz
> Issue Type: Bug
> Components: specialpurpose/ecommerce
> Affects Versions: Trunk, 14.12.01
> Reporter: Deepak Dixit
> Assignee: Deepak Dixit
>
> Context path values of "/" are now logged as invalid since tomcat-7.0.58, so
> if you want to mount webapp on "/" than you need to use “” instead “/“.
> Here is the ticket for the same:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=57216
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)