title: Running code in the context of a java WAR from the command line
body: <p>How would I go about writing some code to allow access to a Java class in my webapp from the command line.</p>
  
  <p>E.g. I have a java class with command line interface, that can runs code in the context of the webapp, with access to the DB etc. I want to log on the machine hosting my WARred app in tomcat and be able to interact with it </p>
  
  <p>Where should i start looking ?</p>
  
  <p>Thanks </p>