Dirichlet boundary value problems of the Ernst equation