My understanding is tomcat8 is no more supported as the current version of the platform supports Java 17 and above. Therefore the following documentation should be updated:
For Ubuntu users who installed tomcat using apt, it is necessary to copy ~/.config/libreoffice to $CATALINA_HOME. For tomcat8, it is /usr/share/tomcat8.
After that, you should change the owner of this folder:
sudo mkdir /usr/share/tomcat8/.config
sudo cp -pr ~/.config/libreoffice /usr/share/tomcat8/.config/
sudo chown -R tomcat8.tomcat8 /usr/share/tomcat8/.config/