问题原因是WebSphare下,servletContext.getContextPath()获取到的值为“/”而非空字符串。

在/portal-master/portal-impl/src/com/liferay/portal/spring/context/PortalContextLoaderListener.java文件中有如下代码:

if (ServerDetector.isWebSphere() &&_portalServletContextPath.isEmpty()) {
    _portalServlerContextName = StringPool.BLANK;
}

修改为:

if (ServerDetector.isWebSphere() &&(_portalServletContextPath.isEmpty() ||
    _portalServletContextPath.equals(StringPool.SLASH))) {
    _portalServletContextPath = StringPool.BLANK;
    _portalServlerContextName = StringPool.BLANK;
}

相关文章:

  • 2021-09-16
  • 2021-09-18
  • 2021-11-11
  • 2021-07-25
  • 2021-09-09
猜你喜欢
  • 2021-09-04
  • 2021-09-16
  • 2021-11-05
  • 2021-06-19
  • 2021-11-27
相关资源
相似解决方案