I am trying to deploy my react app in tomcat. My react has react-router which is being used to redirect to different pages.
My folder structure looks like:
-apache-tomcat-10\webapps\SampleReactApp\index.html
I have modified web.xml in \apache-tomcat-10\webapps\ROOT\WEB-INF\web.xml and have included
<error-page>
<error-code>404</error-code>
<location>/index.html</location>
</error-page>
Still I am getting the default error page when I reload. How can I set up to redirect to /sample (from where it can use react-router to direct) whenever I reload the page?