In order to model a ship hull's response to the impact of surface waves, the two-dimensional problem of wave impact on an elastic beam whose ends are connected by springs with a rigid structure uniformly submerged in a fluid is considered. The fluid is assumed to be ideal and incompressible and its flow symmetric; the lateral bending of the beam is described by the Euler equation. The fluid flow and the size of the wetted region are determined simultaneously with the calculation of the the beam deflection within the framework of the Wagner approach which takes into account the reshaping of the free surface of the fluid on interacting with a body. The stresses and strains arising in the beam and at its ends during impact are found. The numerical algorithm developed makes it possible to analyze the elastic effects in fluid impacts on thin-walled structures of finite length. Moreover, as the stiffness of the connecting springs tends to zero, the solution of this problem describes the impact of an elastic beam with free ends on a weakly curved fluid surface.