title: How to Initialize the application in spring?
body: <p>Now come directly to my point,</p>
  
  <p>In <code>JSP</code> I will do the initialization process of my application like,</p>
  
  <pre><code>&lt;%! public void jsp_init(){
  
        //Initialise the domain server to create protocol
        //Create the logging file
  }%&gt;
  </code></pre>
  
  <p>Now i am going to rebuild my previous application from <code>Servlets</code> to <code>Spring 3.2</code> .</p>
  
  <p>How I can I do this with <code>Spring 3.2</code> ?</p>
  
  <p>One of my <code>colleague</code> said me to do this <code>initialization with Constructor of the Spring Controller</code> . </p>
  
  <p>Because I have created the bean for <code>controller class</code> in the <code>applicationContext.xml</code> and I am loading the <code>applicationContext.xml</code> file withe <code>ContextLoadListner</code> in <code>web.xml</code> .</p>
  
  <p>Is this the right way of Initialization ?</p>
  
  <p>What about       <strong>ApplicationListener</strong>       in spring ?</p>
  
  <p>Which is the best way to initialize the application in <code>spring 3.2</code> ?</p>
  
  <p>Hope our stack users will give a good solution.</p>