  We rigorously calculate the propagation and scattering of electromagnetic
waves by rectangular and random arrays of dielectric cylinders in a uniform
medium. For regular arrays, the band structures are computed and complete
bandgaps are discovered. For random arrays, the phenomenon of wave localization
is investigated and compared in two scenarios: (1) wave propagating through the
array of cylinders; this is the scenario which has been commonly considered in
the literature, and (2) wave transmitted from a source located inside the
ensemble. We show that within complete band gaps, results from the two
scenarios are similar. Outside the gaps, however, there is a distinct
difference, that is, waves can be blocked from propagation by disorders in the
first scenario, but such an inhibition may not lead to inhibition or wave
localization in the second scenario. The study suggests that the traditional
method may be ambiguous in discerning localization effects.
