This article presents a numerical technique that ensures the exact solution of stationary shockwaves, known as the hydraulic jump, for the one‐dimensional shallow water equations with the geometric source term. The mathematical description of the hydraulic jump is given by the Rankine–Hugoniot condition, at the interface of a control volume, where one variable in the system, the discharge, is supposed to be constant while the remaining variables are discontinuous. However, at the discrete level, the solution could be, for instance, a 3‐state jump, consisting of extra (intermediate) states resulting in the so‐called numerical anomaly. The anomaly is due to the nonlinearity of the Hugoniot locus and the fact that, at these points, a naive formulation is unlikely to avoid the inaccurate representation. The concept used here is simple, limit all discontinuous variables, that is, the surface flow data inside the cell that contains a shock with the data of the nearby cells where the shock is traveling to, allowing the solution to be linear. When used with a number of well‐known numerical solvers, namely Lax–Friedrichs, HLL, and Roe schemes, this approach is confirmed to accurately capture the moving and stationary shockwaves in the trans‐critical flow over nonflat beds.