title: Is there a way to run a method/class only on Tomcat/Wildfly/Glassfish startup?
body: <p>I need to remove temp files on Tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml.</p>
  
  <p>Is there a way to run a method/class only on Tomcat startup?</p>