code: public static ModuleConfig ensureModuleConfig( String modulePath, ServletContext context )
      {
          try
          {
              ModuleConfig ret = getModuleConfig( modulePath, context );
  
              if ( ret != null )
              {
                  return ret;
              }
              else
              {
                  ActionServlet as = getActionServlet( context );
  
                  if ( as instanceof AutoRegisterActionServlet )
                  {
                      return ( ( AutoRegisterActionServlet ) as ).ensureModuleRegistered( modulePath );
                  }
              }
          }
          catch ( IOException e )
          {
              _log.error( "Error while registering Struts module " + modulePath, e );
          }
          catch ( ServletException e )
          {
              _log.error( "Error while registering Struts module " + modulePath, e );
          }
  
          return null;
      }
docs: Get the Struts ModuleConfig for the given module path.  If there is none registered,
  and if it is possible to register one automatically, do so.