https://stackoverflow.com/a/27805058/62462
web.xml is usually provided in source, it is not something that maven or > any build tool has to generate > Never heard of web.xml being generated. Please show us your project if you think it is. On Sat, Jul 24, 2021 at 3:32 PM Benjamin hansen <benjaminkakke...@gmail.com> wrote: > 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? >