Boundary value problems for forced nonlinear equations at resonance