How do I run an action on server startup using Struts2?
I have to execute a struts2 action on server startup rather than on the first request. Loading data on startup of an application is a common task, you will find several examples on the web. As said in other answers, you should implement a ServletContextListener (that is not Struts2 specific)... you can read a great example here . The important thing here is understanding the Action concept: In Struts2 MVC (Model View Controller) Framework, an Action is the Controller (and part of the Model ). Action s are invoked by Request s coming from the Client s (and one Action is created on every request