title: Restart tomcat automatically when it gets outofmemory error
body: <p>How can I configure Tomcat to automatically restart when get an out of memory [OOME] error.</p>
  
  <p>As i think</p>
  
  <pre><code>-XX:OnOutOfMemoryError="/yourscripts/tomcat-restart"
  </code></pre>
  
  <p>But not sure here "yourscripts" stand for what directory?</p>