title: Convert Java Servlet to Standalone Java Application
body: <p>I have a legacy Java servlet that is currently running in a Tomcat container. I want to run it outside the container, as a standalone Java application. The primary intention in doing so is because the new role in which this application will be deployed, involves only computation, and no servicing of requests.</p>
  
  <p>How should I go about modifying the servlet code? Will pulling out the servlet's <code>init()</code> code into the <code>main()</code> method of a new class help?</p>