Encountering Server Issue
My server is returning a 404 NOT FOUND error when trying to access my static files: css and js. In IntelliJ IDEA, the path appears correct as shown in the image https://i.stack.imgur.com/nTFv9.png.
However, upon accessing the page on login.jsp, the browser displays the following message in the console:
GET http://localhost:8087/static/css/actionForm.css net::ERR_ABORTED 404 (Not Found)
While JS and CSS files from CDNs like Bootstrap work fine, custom files are failing to load.
Previously, everything worked well in this project, but now I am unsure of what caused this error.
Attempts at Resolution
I have tried adjusting the relative path of the project and using asset methods in the src parameter, but nothing has solved the issue. While there are suggestions involving the server.js file, I believe the solution may lie elsewhere.
Below is the expanded project structure with the static directory:
https://i.stack.imgur.com/ag51I.png
The WAR was deployed successfully, with the structure as depicted below, yet the server is unable to access these specific files.
https://i.stack.imgur.com/3FImC.png
The logs indicate the following:
2021-01-05 23:00:47 [DEBUG] DispatcherServlet:865 - DispatcherServlet with name 'dispatcher' processing GET request for [/static/css/actionForm.css]
2021-01-05 23:00:47 [DEBUG] RequestMappingHandlerMapping:304 - Looking up handler method for path /static/css/actionForm.css
2021-01-05 23:00:47 [DEBUG] RequestMappingHandlerMapping:314 - Did not find handler method for [/static/css/actionForm.css]
2021-01-05 23:00:47 [WARN ] PageNotFound:1147 - No mapping found for HTTP request with URI [/static/css/actionForm.css] in DispatcherServlet with name 'dispatcher'