Currently if i deploy a war file on tomcat named say myapp.war
, I can access its url by http://localhost/myapp/MyServlet.
However what I want is to deploy a war with a version number in the war file name and still have the same url.
For eg, I want to deploy myapp-1.1.0.war
and still have the url be http://localhost/myapp/MyServlet
Of course I need to keep updating the war and the version number will keep changing, so I cant hardcode the war filename anywhere.
Is there any setting in web.xml
I can use to keep the same url for the app regardless of the war filename?