We present high spatial resolution near-infrared broad-band JHK and Br_gamma 2.166 micron and H_2 1-0 S(1) 2.121 micron emission line images of the circumnuclear star formation rings in the LINER/Seyfert 1 galaxy NGC 1097 and the Seyfert 2 galaxy NGC 6574. We investigate the morphology, extinction, and the star formation properties and history of the rings, by comparing the observed properties with an evolutionary population synthesis model. The clumpy morphology in both galaxies varies strongly with wavelength, due to a combination of extinction, hot dust and red supergiants, and the age of the stellar populations. The near-infrared and radio morphologies are in general agreement, although there are differences in the detailed morphology. From the comparison of Br_gamma and H_alpha fluxes, we derive average extinctions toward the hot spots A_V = 1.3 for NGC 1097 and A_V = 2.1 for NGC 6574. The observed H_2/Br_gamma ratios indicate that in both rings the main excitation mechanism of the molecular gas is UV radiation from hot young stars, while shocks can contribute only in a few regions. The starburst rings in both galaxies exhibit small Br_gamma equivalent widths. Assuming a constant star formation rate with M_u = 100 M_o results in extremely long ages (up to 1 Gyr), in disagreement with the morphology and the radio spectral index of the galaxies. This situation is only slightly remedied by a reduced upper mass cutoff (M_u = 30 M_o). We prefer a model of an instantaneous burst of star formation with M_u = 100 M_o occurring ~6-7 Myr ago. Gaseous nuclear bars parallel to the stellar nuclear bar were detected in both galaxies, with M ~100 M_o for the mass of the excited nuclear H_2 emission. Finally, we briefly discuss the connection between the rings, bars and the fuelling of nuclear activity.