in the constructor of bean, you can initialize arraylist
Thanks for your reply.. I did that but another problem stroke at that time. UserBean is class , a managed bean, which handles login and logout action as well. When there is login no problem occurs as it's instance is already created and ready for further navigation . But when log out action has been fired I have to remove UserBean's instance from session using following code
HttpServletRequest req = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
So when UserBean is being removed a topic list is already associated with it is also get removed. After log out , index page should appear with topic list and login page as I described earlier. So How can I achieve log out action then .............
try include the list in postconstructor:
This way, always the bean is created this function is executed