简体   繁体   中英

Return 404 with TomEE and Intellij

I created a sample Jakarta EE web application which is auto-generated by IntelliJ. I deployed the war file to TomEE (9.0) and It returns 404 error. I deployed the same war file to Tomcat (10.0) and it shows me index.jsp successfuly.

I wonder why TomEE is not working? I downloaded it (webprofile) from https://tomee.apache.org/download.html (latest one, TomEE 9.0)

TomEE TomEE 404 status

Tomcat Tomcat Successful index.jsp

Create Sample Project - 1

Create Sample Project - 2

I tried everything I can do. Application context and url path are same. Execute TomEE from command line and url localhost:8080 gives me successful home page of TomEE.

Hmm, I found the answer.

IntelliJ automatically change CATALINA_BASE to its own path. You can override it with your TomEE path. and, make sure that Application Context name is same to your war file name.

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