The following code fix has been confirmed by the customer:
private String getContextPath(ExternalContext extContext) {
if (contextPath == null) {
ServletContext servletContext = (ServletContext) extContext.getContext();
String publicContextPath = servletContext.getInitParameter("publicContextPath");
if (null != publicContextPath)
{
contextPath = publicContextPath;
}
else
{
contextPath = extContext.getRequestContextPath();
}
// Configuration configuration = ((BridgeExternalContext) extContext).getConfiguration();
// contextPath = configuration.getAttribute("publicContextPath", extContext.getRequestContextPath());
if (!contextPath.startsWith("/"))
{
contextPath = "/" + contextPath;
}
if (contextPath.endsWith("/"))
{
contextPath = contextPath.substring(0, contextPath.length() - 1);
}
}
return contextPath;
}
The following code fix has been confirmed by the customer:
private String getContextPath(ExternalContext extContext) {
{ contextPath = publicContextPath; }if (contextPath == null) {
ServletContext servletContext = (ServletContext) extContext.getContext();
String publicContextPath = servletContext.getInitParameter("publicContextPath");
if (null != publicContextPath)
else
{ contextPath = extContext.getRequestContextPath(); }// Configuration configuration = ((BridgeExternalContext) extContext).getConfiguration();
{ contextPath = "/" + contextPath; }// contextPath = configuration.getAttribute("publicContextPath", extContext.getRequestContextPath());
if (!contextPath.startsWith("/"))
if (contextPath.endsWith("/"))
{ contextPath = contextPath.substring(0, contextPath.length() - 1); }}
return contextPath;
}