简体   繁体   中英

Cannot deploy using Apache Tomcat but deploying with Eclipse works

I'm trying to deploy my java app as a web service using Tomcat Apache. I put the .war file under the /webapps directory, run Apache, and when I try to access the url I get a 404 error.

I've created my app on Eclipse, and if I try to deploy it from Eclipse using a Tomcat server, it works, I can correctly access all my servlets.

What might I be missing / doing wrong?

Thank you,

You either have the wrong URL when you run outside Eclipse or the WAR file that you deploy is incorrect.

You should look at the Tomcat logs and console to see what messages it gives to explain what you did wrong.

Eclipse is just an IDE. Your code won't have access to it in production. Put aside that it works there and figure out what you did wrong with the package.

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