I have read through this post: https://crunchify.com/how-to-run-java-program-automatically-on-tomcat-startup/
which describes how to automatically start my project under tomcat during startup. Basically I have to add this to my web.xml <servlet> <servlet-name>CrunchifyTutorials</servlet-name> <servlet-class>crunchify.com.tutorials.CrunchifyServletExample</servlet- class> <load-on-startup>1</load-on-startup> </servlet> however the web.xml is generated by maven, so somehow i think i have to put this into pom.xml which then will instruct maven to add this to the web.xml file. So my question is how i should put this into the pom.xml file?