The paper deals with the existence of weak solutions to the Dirichlet problem - div(h(x)Vu) + a(x)u = Af(x, u), in A, u=0 on D, where D is a bounded domain in RN, N or = 3, A is a positive parameter, h(x) E Lloc(D), a(x) E L(D), f(x, s) is subcritical and does not have superquadratic behavior at infinity. The solutions are found by using the Mountain Pass Theorem corresponding to the Cerami compactness condition.