We report an experimental and theoretical study of the global stability and nonlinear dynamics of vertical jets of viscous liquid confined in the axial direction due to their impact on a bath of the same liquid. Previous works demonstrated that in the absence of axial confinement the steady liquid thread becomes unstable due to an axisymmetric global mode for values of the flow rate, $Q$, below a certain critical value, $Q_{c}$, giving rise to oscillations of increasing amplitude that finally lead to a dripping regime (Sauter & Buggisch, J. Fluid Mech., vol. 533, 2005, pp. 237–257; Rubio-Rubio et al., J. Fluid Mech., vol. 729, 2013, pp. 471–483). Here we focus on the effect of the jet length, $L$, on the transitions that take place for decreasing values of $Q$. The linear stability analysis shows good agreement with our experiments, revealing that $Q_{c}$ increases monotonically with $L$, reaching the semi-infinite jet asymptote for sufficiently large values of $L$. Moreover, as $L$ decreases a quasi-static limit is reached, whereby $Q_{c}\rightarrow 0$ and the neutral conditions are given by a critical length determined by hydrostatics. Our experiments have also revealed the existence of a new regime intermediate between steady jetting and dripping, in which the thread reaches a limit-cycle state without breakup. We thus show that there exist three possible states depending on the values of the control parameters, namely steady jetting, oscillatory jetting and dripping. For two different combinations of liquid viscosity, $\unicode[STIX]{x1D708}$, and injector radius, $R$, the boundaries separating these regimes have been determined in the $(Q,L)$ parameter plane, showing that steady jetting exists for small enough values of $L$ or large enough values of $Q$, dripping prevails for small enough values of $Q$ or sufficiently large values of $L$, and oscillatory jetting takes place in an intermediate region whose size increases with $\unicode[STIX]{x1D708}$ and decreases with $R$.