The primary objectives in the design of survivable WDM mesh networks are maximizing network efficiency and minimizing restoration time. P-cycle based protection scheme can achieve both objectives simultaneously. However, configuring p-cycles dynamically in WDM mesh networks under wavelength continuity constraint poses a major challenge due to the wavelength blocking that may take place during the setup of a new lightpath. This paper investigates ways of configuring p-cycles statically and dynamically in WDM mesh networks under dynamic traffic and wavelength continuity constraint. Several dynamic configuration options are analyzed and their performances are evaluated. To improve the blocking performance, two routing and wavelength assignment schemes are proposed. The blocking performances of the different configuration methods, together with different dynamic routing strategies, have been evaluated and compared using simulations.