By using the comoving distance, we derive an analytic expression for the
optical depth of gravitational lensing, which depends on the redshift to the
source and the cosmological model characterized by the cosmic mass density
parameter Ωm, the dark energy density parameter Ωx and its
equation of state ωx=px/ρx. It is shown that, the larger the
dark energy density is and the more negative its pressure is, the higher the
gravitational lensing probability is. This fact can provide an independent
constraint for dark energy.Comment: 9 pages, 2 figure