code: public static String getModulePathForRelativeURI( String uri )
      {
          if ( uri == null ) return null;
          assert uri.length() > 0;
          assert uri.charAt( 0 ) == '/' : uri;
  
          // Strip off the actual page name (e.g., some_page.jsp)
          int slash = uri.lastIndexOf( '/' );
          uri = uri.substring( 0, slash );
  
          return uri;
      }
docs: Get the Struts module path for a URI that is relative to the web application root.
  
  @param uri the URI for which to get the module path.