title: Invoking action method in the application startup (JSF)
body: <p>We need to call a action method while invoking the first page of the application. For example, the first page is <code>index.jsp</code>, when we are directly calling this page the action method is not called. To achieve that, we have written another page where it uses <em>java script</em> to click on the button and call the action method, that navigates to the index.jsp.</p>
  
  <p>I feel that there should be proper way in JSF to achieve this task. What is the bet way to do that? I have told the team that we can call the action method in the constructor while loading the page. Is it the correct way? What are the possible solutions? </p>