Unfortunately, access to server.xml has been restricted. Is there another way to change the port that tomcat is using? Specifically in tomcat 7.0.75 and 8.0.44. Explanation for the restriction was that, we should not change tomcat settings in the tomcat files, but in files loaded from the application running on the tomcat (as only in /webapps). I understand that this is possible for web.xml and other settings. But is this also possible for server.xml settings? And if yes, where and how?
Asked
Active
Viewed 29 times
1 Answers
1
You cannot change the Tomcat port from application files (such as, in /webapps
).
This makes sense, because when applications are loaded, Tomcat is already running, and the port that Tomcat is running on has already been chosen.
You can only change the port from /conf/server.xml
. While developers should not change Tomcat settings, your server administrators should certainly be able to change the port with proper justification.

JonathanDavidArndt
- 1,424
- 3
- 20
- 29