I was able to resolve this by running this command (add the Ubuntu 22.04 repository):
Code:
add-apt-repository -y -s "deb http://archive.ubuntu.com/ubuntu/ jammy main universe"
After that, I was able to install Tomcat 9 on Ubuntu 24.04 via apt.
Not sure if there could be any bad consequences after adding a legacy repository, though.