  The Woods-Saxon basis has been suggested to replace the widely used harmonic
oscillator basis for solving the relativistic mean field (RMF) theory in order
to generalize it to study exotic nuclei. As examples, relativistic Hartree
theory is solved for spherical nuclei in a Woods-Saxon basis obtained by
solving either the Schr\"odinger equation or the Dirac equation (labelled as
SRHSWS and SRHDWS, respectively and SRHWS for both). In SRHDWS, the negative
levels in the Dirac Sea must be properly included. The basis in SRHDWS could be
smaller than that in SRHSWS which will simplify the deformed problem. The
results from SRHWS are compared in detail with those from solving the spherical
relativistic Hartree theory in the harmonic oscillator basis (SRHHO) and those
in the coordinate space (SRHR). All of these approaches give identical nuclear
properties such as total binding energies and root mean square radii for stable
nuclei. For exotic nuclei, e.g., $^{72}$Ca, SRHWS satisfactorily reproduces the
neutron density distribution from SRHR, while SRHHO fails. It is shown that the
Woods-Saxon basis can be extended to more complicated situations for exotic
nuclei where both deformation and pairing have to be taken into account.
