Abhay Agarwal wrote:If you want Container to run your servlet at start up of application, try exploring <load-on-startup> element of web.xml. With this, you can load servlet at the start of application.
Just for not to make the OP confused: <load-on-startup> does nothing other than instantiating the servlet and calling the init() method. In other words, neither doGet or doPost is called by that.