In my application I pass my variables through the servlet in another application ,so in the first time that I've entered to the application It makes search,but if I do back to the first application and pass other variables with servlet it didn't make the search. I put variables,and i send them to the Main class:
iHttpServletRequest.getSession().setAttribute("aQuery",aQuery); iHttpServletResponse.sendRedirect(getServletContext().getContextPath()+"/Main.iface");
the first time it goes to the constructor of the Main class and do the Search in the right way,but the second time it doesn't go to the constructor ,so how I can put the null to the Main class ,becouse I want always get to the constructor of the Main from the servlet.
Thank You.
@RequestScoped
for yourMain
class and do thegetSession().setAttribute("aQuery",aQuery);
as usual. – Narayana Nagireddi