3

I can run a Spring boot application by deploying its war in an external Tomcat 8.5, but cannot run the same from Spring Tool Suite.

I have a Spring boot application with packaging set to war. I can generate the war file, deploy it to an external tomcat with version 8.5.34. But I cannot run this application using Spring Tool Suite. When I right click on the project > Run As > Run on Server, I get the following dialog box dialog box When I select Tomcat 8.5, the next and finish buttons are disabled. The Server name box is disabled as well. It works fine when selecting Tomcat 9 though.

If I try to edit the Server's host name, I can see a message appear in the dialog box that says The server does not support version 4.0 of the J2EE Web module specification dialog box

If I am able to run the application in an external tomcat, why not in an embedded one?

Kshitij Bajracharya
  • 811
  • 2
  • 14
  • 37
  • 1
    I get a similar error `Tomcat version 8.5 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, and 7 Web modules` but works fine with Tomcat 9 – Nikhil Dec 30 '18 at 07:21
  • I think you will have to follow this procedure to change the web module to 3.1 to make it work on Tomcat 8.5 or just use Tomcat 9 instead: https://stackoverflow.com/questions/19661135/dynamic-web-module-3-0-3-1 – Nikhil Dec 30 '18 at 07:30
  • @Nikhil could you tell me why it works without complain when deployed in an external tomcat 8.5? – Kshitij Bajracharya Dec 30 '18 at 09:44
  • As in the second comment, it has to do with the Eclipse project facets. If the project facets configuration for Dynamic Web Module is set to 4.0 the error appears. Please see the link I shared earlier. – Nikhil Dec 30 '18 at 09:46
  • Couldn't change the project facet so ended up using Tomcat 9 instead. – Kshitij Bajracharya Dec 30 '18 at 10:33

0 Answers0