Reputation:
I created a webapp and I deployed it on tomcat.
But instead of http://ip:port I need to put http://ip:port/nameOfTheWarFile
to enter. is there a way to remove that name from the url and just use http://ip:port?
Upvotes: 1
Views: 1067
Reputation: 12453
Deploy the application as ROOT.war
.
If you do not want the application name to be inside the URL and to access the application directly on a URL like "http://ip:port", then it means that you want an empty context path for your web app.
Based on the Tomcat documentation, you can deploy a web application with the base name equal to ROOT
(i.e. ROOT.war
or ROOT.xml
) to achieve an empty context path:
Context Path | Base File Name | Example File Names
Empty String | ROOT | ROOT.xml, ROOT.war, ROOT
Upvotes: 2
Reputation: 11
You will need to change the context path of your web application. Another user had a similar question and was answered here.
How to set the context path of a web application in Tomcat 7.0
Upvotes: 0