I have an ajax POST call that is returning some value to a controller. I need this particular value in another class. I am also able to return the value. However during the actual execution, the method which needs the value is executed first instead of the ajax call/controller. Hence the variable value is always null. How do I execute the controller first so that the value is passed on to the other class?