We investigate theoretically electron spin states in one dimensional (1D) and two dimensional (2D) hard-wall mesoscopic rings in the presence of both the Rashba spin-orbit interaction (RSOI) and the Dresselhaus spin-orbit interaction (DSOI) in a perpendicular magnetic field. The Hamiltonian of the RSOI alone is mathematically equivalent to that of the DSOI alone using an SU(2) spin rotation transformation. Our theoretical results show that the interplay between the RSOI and DSOI results in an effective periodic potential, which consequently leads to gaps in the energy spectrum. This periodic potential also weakens and smoothens the oscillations of the persistent charge current (CC) and spin current (SC) and results in the localization of electrons. For a 2D ring with a finite width, higher radial modes destroy the periodic oscillations of persistent currents.