If you want to wish to work on a Java-based dynamic web application and need to deploy a .war file then a VPS is a better choice than traditional shared hosting. Shared hosting does not support Tomcat or custom Java applications. For that you have to configure Tomcat on VPS first then you can do your work.
To configure the Tomcat on VPS you can follow the following steps:
I hope this work for you.