  To investigate the effect of gravitational lensing of supernovae in large
ongoing surveys, we simulate the effect of gravitational lensing magnification
on individual supernovae using observational data input from two large
supernova surveys. To estimate the magnification due to matter in the
foreground, we simulate galaxy catalogs and compute the magnification along
individual lines of sight using the multiple lens plane algorithm. The dark
matter haloes of the galaxies are modelled as gravitational lenses using
singular isothermal sphere or Navarro-Frenk-White profiles. Scaling laws
between luminosity and mass, provided by Faber-Jackson and Tully-Fisher
relations, are used to estimate the masses of the haloes.
  While our simulations show that the SDSSII supernova survey is marginally
affected by gravitational lensing, we find that the effect will be measurable
in the SNLS survey that probes higher redshifts. Our simulations show that the
probability to measure a significant (3 sigma) correlation between the Hubble
diagram residuals and the calculated lensing magnification is ~95% in the SNLS
data. Moreover, with this data it should be possible to constrain the
normalisation of the masses of the lensing galaxy haloes at the 1 sigma and 2
sigma confidence level with ~30% and ~60% accuracy, respectively.
