code: public static ModuleConfig selectModule( String prefix, HttpServletRequest request, ServletContext servletContext )
      {
          ModuleConfig moduleConfig = getModuleConfig( prefix, servletContext );
  
          if ( moduleConfig == null )
          {
              request.removeAttribute( Globals.MODULE_KEY );
              return null;
          }
          
          // If this module came from an abstract page flow controller class, don't select it.
          ControllerConfig cc = moduleConfig.getControllerConfig();
          if (cc instanceof PageFlowControllerConfig && ((PageFlowControllerConfig) cc).isAbstract()) {
              return moduleConfig;
          }
          
          // Just return it if it's already registered.
          if ( request.getAttribute( Globals.MODULE_KEY ) == moduleConfig ) return moduleConfig;
          request.setAttribute( Globals.MODULE_KEY, moduleConfig );
  
          MessageResourcesConfig[] mrConfig = moduleConfig.findMessageResourcesConfigs();
          Object formBean = unwrapFormBean( getCurrentActionForm( request ) );
          
          for ( int i = 0; i < mrConfig.length; i++ )
          {
              String key = mrConfig[i].getKey();
              MessageResources resources = ( MessageResources ) servletContext.getAttribute( key + prefix );
              
              if ( resources != null )
              {
                  if ( ! ( resources instanceof ExpressionAwareMessageResources ) )
                  {
                      resources = new ExpressionAwareMessageResources( resources, formBean, request, servletContext );
                  }
                  
                  request.setAttribute( key, resources );
              }
              else
              {
                  request.removeAttribute( key );
              }
          }
          
          return moduleConfig;
      }
docs: Set the given Struts module in the request, and expose its set of MessageResources as request attributes.
  
  @param prefix the prefix of the desired module.
  @param request the current HttpServletRequest.
  @param servletContext the current ServletContext.
  @return the selected ModuleConfig, or <code>null</code> if there is none for the given module prefix.