I am using tomcat version 7 and have hosted one resource file in webapp. Right now, I am accessing my resource file by typing the URL http://dcdvdvdsv.com:8080/resourcefilename.
I have mapped my IP in my hosts file.
I want to get rid of the port number inside the URL. How can I do that?
Well, to change the port that Tomcat uses is a simple matter of changing the entry in the server. xml file under conf directory. In both cases change the port to 80 and you remove the requirement to provide a port on the url string. This should also eliminate the need for http:// but, that's a function of the browser.
Whenever you enter a URL without a port, it defaults to port 80, the standard http port.
Change your Tomcat's listening port from 8080 to 80, and you'll be done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With