As pointed out in the question, Tomcat provided by Raspbian does not work with Java 8. I was able to install Tomcat 8 in accordance with the instructions of this blog . To avoid the link and fix a small error, I will give the text there almost literally (updated for version 8.0.24):
Install Apache Tomcat 8 on Raspberry Pi
I have already installed the Apache 2 HTTP server on my raspberry Pi, and therefore, this article does the basic installation and configuration of Tomcat. First, update all installed packages:
$ sudo apt-get update
Confirm that Java is already installed:
pi@raspberrypi /usr/bin $ java -version java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)
Enter the pi user home directory and download the required Tomcat release:
$ wget http://mirrors.axint.net/apache/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz
Extract the archived archive:
$ tar xvf apache-tomcat-8.0.24.tar.gz
Add the following custom XML element as the last child element to the parent element tomcat-users ~/apache-tomcat-8.0.24/conf/tomcat-users.xml (this creates an administrator account "system" whose password is "crimson"):
<user username="system" password="raspberry" roles="manager-gui"/>
Change the directory permissions in the following directories, as default, the pi Linux user cannot write to them:
[NB: I did not need to do this step, as in version 8.0.24, there was no apache-tomcat-8.0.24/work/Catalina directory]
Add a start script called tomcat to the /etc/init.d directory, which has the following contents:
#!/bin/sh # /etc/init.d/tomcat # starts the Apache Tomcat service ### BEGIN INIT INFO # Provides: tomcat # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop tomcat application server ### END INIT INFO export CATALINA_HOME="/home/pi/apache-tomcat-8.0.24" case "$1" in start) if [ -f $CATALINA_HOME/bin/startup.sh ]; then echo $"Starting Tomcat" /bin/su pi $CATALINA_HOME/bin/startup.sh fi ;; stop) if [ -f $CATALINA_HOME/bin/shutdown.sh ]; then echo $"Stopping Tomcat" /bin/su pi $CATALINA_HOME/bin/shutdown.sh fi ;; *) echo $"Usage: $0 {start|stop}" exit 1 ;; esac
Use the update-rc.d command to add the appropriate links to the /etc/rc?.d directories:
$ sudo update-rc.d tomcat defaults
Check if the tomcat server starts:
$ sudo /etc/init.d/tomcat start
In the web client, specify the browser at http://"Raspberry Pi IP Address":8080

Verify that the tomcat server is stopping:
$ sudo /etc/init.d/tomcat stop
Finally, reboot the system, and the Tomcat application server should now start automatically at startup, as well as when the system shuts down.
One note: for me, as a hardcore Linux user, this solution sounds a bit hacky by installing software in the user's home directory, but it works.