docs: public static String getContextName(ExternalContext ec)
      {
          try
          {
              if (isPortlet(ec))
              {
                  return (String) _runMethod(ec.getContext(),
                          "getPortletContextName");
              }
              else
              {
                  return ((ServletContext) ec.getContext())
                          .getServletContextName();
              }
          }
          catch (final ClassCastException e)
          {
              _LOG.severe(e.getMessage());
          }
          return null;
      }