Existence of solutions for Dirichlet elliptic problems with discontinuous nonlinearity