title: How do I run a WAR on Tomcat within eclipse if it's not a 'dynamic web app'?
body: <p>I am going through the jwt tutorial (this is Java Web Toolkit, not JSON Web Tokens). The tutorial provides an eclipse project to download and import into eclipse, and has instructions for deploying it on a jetty server.</p>
  
  <p>I would like to deploy it on the tomcat server I already have installed as a server in eclipse, so that I can make changes and redeploy without the annoying steps of copying the WAR file to an external Tomcat install and attaching a remote debug session.</p>
  
  <p>I've built the war file, and if I deploy it to the external session it runs fine. But I cannot figure out how to tell eclipse to deploy it to the internal server. When I right-click the project and choose "Run" or "Debug", there is an option for running it as an application, but none for running on a server. I am guessing that eclipse only provides that option for "Dynamic Web Applications", but this isn't marked that way, and that's just a guess.</p>
  
  <p>How can I configure the project so that eclipse will know to deploy its war file on the internal server?</p>
  
  <p>Also -- it's not a Maven project, they have a build.xml for Ant.</p>
  
  <hr>
  
  <p>Well, I found "Project Facets" and set the project facet for my 'hello' application to be "Dynamic Web Module", and now there's an option for running it on the server. But when I do, I get 404 "did not find a representation for the current resource", with no error messages in the console or the terminal. I retried the WAR in the external server just to make sure, and that still works.</p>
  
  <p>Any suggestions?</p>
  
  <hr>
  
  <p>Link to tutorial: it's section 3 of <a href="https://www.webtoolkit.eu/jwt/latest/doc/userguide/userguide.html" rel="nofollow noreferrer">https://www.webtoolkit.eu/jwt/latest/doc/userguide/userguide.html</a></p>
  
  <p>I realize Dynamic Web Module may have been the wrong path, but in our age of trial-and-error programming, it seemed reasonable to try to make eclipse think it was a web project for this purpose. I'm happy to back that out (somehow) if it isn't right.</p>
  
  <p>Their instructions cover deployment within eclipse for Jetty, which I do not use.  I would have thought that, if an index.html or a web.xml were required for tomcat-under-eclipse, it would be required for Jetty-under-eclipse, but that's just a guess.</p>