简体   繁体   中英

Hosting SpringBoot on Tomcat 9 gives 404 error

I'm trying to host an APP developed by the EU ( ESPD Git ) on my local Tomcat 9 server running on JAVA 8 JDK. I have just basic expririence with Java and this creates me a lot of problems.

When I run the project with the command:

java -Dspring.profiles.active=prod -Xms768m -Xmx768m -Dserver.port=8080 -jar espd-web.war

The app is running smooth, but when I try to run it on a Tomcat 9, and then go to the Tomcat Manager and click on the context path "/espd" I got 404 error. The log file are not of any help as they only log that an 404 error occurs and nothing more.

I build the *.war file with both profiles defined in the project.

mvn package -Pembedded

and with

mvn package -Pnon-embedded

But non of them is working in Tomcat. As my understending goes the project is build on Springboot framework.

Hope someone can help me and point me in the right direction.

In the project requirements it states that Tomcat 7 and Java 7 should be used. Tried that also, but still not working.

tomcat server already started without anything in it, ie no web applications. You have to 'run' or actually deploy something in that Eclipse Tomcat server so you won't get the 404s.

The fact that you do get 404 error messages indicates that Tomcat actually running. If you shut it down from Eclipse/IJ/TaskManager, you won't get those 404's anymore

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM