• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Angular-Spring Boot Application: 404 Error on Page Reload with Tomcat 10 Server

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Issue: I have an Angular frontend combined with a Spring Boot backend, running on a Tomcat 10 server. The routing within the application works flawlessly, but I encounter a persistent issue whenever I attempt to reload the page, leading to a 404 resource not found error.

Here's the structure of my setup:

Angular application located in webapps/ROOT Spring Boot backend situated under webapps/spec My application.yaml configuration:



Question: How can I resolve the issue of encountering a 404 resource not found error upon reloading the page in my Angular-Spring Boot application setup on a Tomcat 10 server? Additionally, how can I ensure that both frontend and backend functionalities are maintained intact even after implementing a solution for page reloads?

Things I've Tried:

Added <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
in server.xml and configured rewrite.config with the following rules:


This solution somewhat works as it allows page reloads without encountering a 404 error. However, it fails to load the backend, thus hindering functionalities like user login.
 
Have you no shame? Have you no decency? Have you no tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic