title: How to create an war file in Eclipse without ant or maven?
body: <p>I am using <em>Eclipse IDE for Java Developers</em> Helios. I have mainly done desktop applications before but now I would like to learn about Servlets. I have installed Jetty on my computer. And I wrote a simple Servlet in Java using Eclipse. But how do I compile it and export it to a war file in Eclipse? I have found some tutorials doing it with Ant, but I would like to do it native in Eclipse if possible.</p>
  
  <p>Here is my Servlet:</p>
  
  <pre><code>package org.jonas;
  
  // some imports from java.io, java.servlet and java.servlet.http
  
  public class MyServlet extends HttpServlet {
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException {
  
          response.setContentType("text/html");
          PrintWriter out = response.getWriter();
  
          String name = request.getParameter("name");
  
          out.println(
                  "&lt;html&gt;&lt;body&gt;" +
                  "&lt;h1&gt;" + name + "&lt;/h1&gt;" +
                  "&lt;/body&gt;&lt;/html&gt;");
      }
  }
  </code></pre>
  
  <p>How can I compile it and export it as a war file in Eclipse? Without Ant or Maven. So I can deploy it in Jetty.</p>