vscode-tomcat icon indicating copy to clipboard operation
vscode-tomcat copied to clipboard

Cannot run exploded war without web.xml

Open mprobst-faw opened this issue 6 years ago • 1 comments

  • VSCode Version: 1.32.3
  • OS Version: Windows 10
  • Tomcat Extension Version: 0.11.1

Steps to Reproduce:

  1. Create a Web Fragment project and package it as jar with maven.
  2. Create a Web project and package it as war with maven with a dependency to the Web Fragment project.

In my Web project i do not have a web.xml, because it's all in the web-fragment.xml in my Web Fragment project.

If i try to run the war file in Tomcat everything works fine, but if i try to run the exploded war i get the message: "The folder is not a valid web app to run on Tomcat Server.".

When i create a web.xml file it works, but i do not need a web.xml file.

mprobst-faw avatar Mar 27 '19 06:03 mprobst-faw

I can confirm that, and it's really annoying. Since the Servlet 3 specification, web.xml is no longer needed for configuring your web application and has been replaced by annotations. @SummerSun, it should be enough to just look for the folder WEB-INF to allow the deployment of the exploded war folder. Then if something goes wrong, it's up to us.

It should be enough to remove web.xml from the line https://github.com/adashen/vscode-tomcat/blob/master/src/Tomcat/TomcatController.ts#L287

xhaggi avatar Mar 27 '19 19:03 xhaggi