I'm trying to deploy a React app in Jenkins using Tomcat 9. Everything is working except when I try to enter an invalid route in the browser's address bar. It only displays the Tomcat 404 page instead of my custom 404 page.
The solution I found in the documentation led me to this answer. Now, the problem is how can I dynamically add a web.xml
file inside the war file that gets built and deployed in Jenkins? I have tried adding it inside my project's public
folder, but it only gets added inside the build
folder.