The document provides to methods and materials for generating T cells (e.g., antigen-specific CD4+ T cells). For example, methods and materials for using nested MHC class II epitopes as vaccines to generate activated CD4+ T cells in vivo or as reagents to generate activated CD4+ T cells ex vivo are provided.