0
votes

I've basically pinned down the issue to be something wrong with an external remote tomcat server I have running: where any path of an application that would be the index (10.0.0.222:8080/demo-0.0.1-SNAPSHOT) works but past that (10.0.0.222:8080/demo-0.0.1-SNAPSHOT/home) results in an error 404. This path works when running with an embedded tomcat server and when running an external tomcat server on my localhost machine so I'm pretty sure that the issue is something wrong with my remote tomcat server. I have no idea what could be causing this so I appreciate any help and if there are any more information/files I can provide, please let me know.

I have this problem with my spring boot project where the application runs fine when using the embedded tomcat server, but when I compile and package the project as a war in order to deploy it on my external tomcat server, I can't send requests to it and the code in the main method doesn't run https://github.com/louisspaghetti/demo

Some notes: There are no errors when I deploy it to external tomcat/when I start it on tomcat.

I'm able to send requests to localhost:8080/home when running with embedded tomcat but requests to 10.0.0.222:8080/demo-0.0.1-SNAPSHOT/home (accessing external tomcat) results in error 404.

I have another project on the tomcat server that I made with raw java servlets and it runs fine, so I don't think it's a problem with my tomcat config but I guess it could be...

EDIT: I added another mapping for "/" to return index.html and that worked but "/home" (or 10.0.0.222:8080/demo-0.0.1-SNAPSHOT/home) still doesn't work

EDIT 2: The application works with the /home path when running on a tomcat server I recently created on my local host machine. The other application I had working before on my remote tomcat server now only works with index.html as well making me believe this must be an issue with the server? Does anyone know of what I have to do to fix this?

FIXED: Use Tomcat 9 instead of 10

1

1 Answers

0
votes

I found the fix: use tomcat 9 instead of 10