0
votes

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.

1
You may have to use @RequestScoped for your Main class and do the getSession().setAttribute("aQuery",aQuery); as usual.Narayana Nagireddi

1 Answers

0
votes

I put my Bean class in @ViewScoped so it works very well,in the first time it starts with the construktor,but after I Do back to another application and change my variables it doesn;t enter to the constructor and it do all jobs that I need. –