The Dirichlet problem for the wave equation