• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 2
  • 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.
 
You can't expect to wield supreme executive power just because
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic