0
votes

I've the following scenario:

  • Windows 10
  • Eclipse Oxygen.3
  • Apache Tomcat 9.0.6
  • JRE 9.0.4
  • An external java app
  • NO MAVEN

I've import the project using the "File > Open Projects from File System" option. After that, this is my app tree:

enter image description here

So this is the steps I've followed:

  • Window > Preferences > Installed JREs > select JRE 9.0.4
  • Window > Preferences > Server > Add > Apache Tomcat 9 > tomcat_install_dir + JRE 9.0.4 + add app
  • Publish + Start Tomcat

Trying to access localhost:8081, I can see the Apache Tomcat main page. I assign all roles to a user in tomcat-users.xml, so I can access to localhost:8080/manager/html and see all deployed applications, including my app.

enter image description here

But, when I try to access to my app, I receive a 404 error, but there's no error in Tomcat logs.

Searching in Tomcat's deploy folder (C:\Program Files\Tomcat9.0\wtpwebapps\app\WEB-INF) I just have a classes folder. No static content, no js,no css, no jsp, no lib,.. nothing except classes folder:

enter image description here

Any ideas about why Tomcat doesn't deploy the other folders? This is the main cause of my 404, I guess.

1

1 Answers

0
votes

Solved - it was a malformed war file.

Go to project > Properties > Deployment Assembly

Here you have to define what folders of your project will be deployed on Tomcat. Make sure to include the web.xml file.