code: private static String generateFormBeanName( Class formBeanClass, HttpServletRequest request )
      {
          ModuleConfig moduleConfig = RequestUtils.getRequestModuleConfig( request );
          String formBeanClassName = formBeanClass.getName();
          
          //
          // A form-bean wasn't found for this type, so we'll create a name.  First try and create
          // name that is a camelcased version of the classname without all of its package/outer-class
          // qualifiers.  If one with that name already exists, munge the fully-qualified classname.
          //
          String formType = formBeanClassName;
          int lastQualifier = formType.lastIndexOf( '$' );
  
          if ( lastQualifier == -1 )
          {
              lastQualifier = formType.lastIndexOf( '.' );
          }
  
          String formName = formType.substring( lastQualifier + 1 );
          formName = Character.toLowerCase( formName.charAt( 0 ) ) + formName.substring( 1 );
  
          if ( moduleConfig.findFormBeanConfig( formName ) != null )
          {
              formName = formType.replace( '.', '_' ).replace( '$', '_' );
              assert moduleConfig.findFormBeanConfig( formName ) == null : formName;
          }
          
          return formName;        
      }
docs: Create the name for a form bean type.
  
  @param formBeanClass the class whose type will determine the name.
  @param request the current HttpServletRequest, which contains a reference to the current Struts module.
  @return the name found in the Struts module, or, if none is found, a name that is either:
  <ul>
  <li>a camel-cased version of the base class name (minus any package or outer-class
  qualifiers, or, if that name is already taken,</li>
  <li>the full class name, with '.' and '$' replaced by '_'.</li>
  </ul>