Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-64764

Cannot run Liferay as an application context other than ROOT

    Details

      Description

      Running Liferay as a separate application context other than ROOT throws NullPointerExceptions.

      Steps to reproduce:

      1) Install Liferay 7 in stock Tomcat 8.0.32 following the steps here: https://dev.liferay.com/discover/deployment/-/knowledge_base/7-0/installing-liferay-on-tomcat-8 but using a different application context name instead of ROOT. For instance: CATALINA_HOME/webapps/my-context

      2) Rename CATALINA_HOME/conf/Catalina/localhost/ROOT.xml to CATALINA_HOME/conf/Catalina/localhost/my-context.xml

      3) Edit file renamed in the previous item to change the path attribute of <Context> to "/my-context"

      4) Set portal.cxt and portal.proxy.path to /my-context in LIFERAY_HOME/portal-ext.properties (I believe porta.cxt is now obsolete)

      5) Edit CATALINA_HOME/webapps/my-context/WEB-INF/web.xml:
      Add new context-param
      <context-param>
      <param-name>root_path</param-name>
      <param-value>/securescape</param-value>
      </context-param>

      and edit context-param below (change is marked in bold):

      <context-param>
      <param-name>osgi.http.endpoint</param-name>
      <param-value>/securescape/o/</param-value>
      </context-param>

      After starting the portal, try to hit localhost:8080/my-context. It should throw this exception: https://gist.github.com/igorarouca/7b75147374855880f715360f92c8a3f7

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 21 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.1 CE GA2