code: boolean tryToInitialize() {
  
          if (m_isInitialized) {
              return true;
          }
          if (OpenCms.getRunLevel() == 4) {
              m_contextPath = OpenCms.getSystemInfo().getContextPath();
              m_servletPath = OpenCms.getSystemInfo().getServletPath() + "/";
  
              /**
               * The URI prefixes, for which the requested URI should not be rewritten,
               * i.e., the ones that should not be handled by the {@link org.opencms.main.OpenCmsServlet}.
               */
              String[] defaultExcludePrefixes = new String[] {
                  "/" + OpenCms.getStaticExportManager().getExportPathForConfiguration(),
                  "/workplace",
                  "/VAADIN/",
                  m_servletPath,
                  "/resources/",
                  "/webdav",
                  "/cmisatom",
                  "/handle404",
                  "/services"};
              StringBuffer regex = new StringBuffer();
              regex.append(m_contextPath);
              regex.append('(');
              regex.append(defaultExcludePrefixes[0]);
              for (int i = 1; i < defaultExcludePrefixes.length; i++) {
                  regex.append('|').append(defaultExcludePrefixes[i]);
              }
              if (!((null == m_additionalExcludePrefixes) || m_additionalExcludePrefixes.isEmpty())) {
                  regex.append('|').append(m_additionalExcludePrefixes);
              }
              regex.append(')');
              regex.append(".*");
              m_regex = regex.toString();
              m_isInitialized = true;
              return true;
          }
          return false;
      }
docs: Checks if OpenCms has reached run level 4 and if so, it initializes the member variables.
  In particular {@link #m_regex}, {@link #m_contextPath} and {@link OpenCmsUrlServletFilter#m_servletPath} are initialized and sets {@link #m_isInitialized} to true.
  
  @return <code>true</code> if initialization was successful, <code>false</code> otherwise.