title: export Java EE Web Application as JAR
body: <p>This might be a weird question but I am curious about this:</p>
  
  <p>I want to create a Java EE Web Project, that I can package into a JAR file (<code>&lt;packaging&gt;jar&lt;/packaging&gt;</code> instead of <code>&lt;packaging&gt;war&lt;/packaging&gt;</code>).</p>
  
  <p>In other words, I want to include the Java EE web server inside a JAR (built by maven).</p>
  
  <p>Inside the WebServer I want to use Servlets like I can use them when I package it to a WAR file but without requireing the devices that execute the JAR to have a Web server installed where they can deploy my JAR.</p>
  
  <p>I want something like an executeable JAR that contains the server and runs it without the need to install something else.</p>
  
  <p>Is there a (ideally light-weight) server that works within a JAR file or any other possibility to create a JAR file like this?</p>