unable to access instance variable in different method in spring mvc
<p>In search() method I am setting value to <code>ss</code> variable, but getting <code>null</code> when when trying to access this inside run() or any other method.</p>

<p>Recently I came to spring from struts. This senerio is possible in struts but i dont know why its not taking in spring.</p>

<p><strong>Note</strong> I can't use here <code>static</code> keyword because its a multi user application.</p>

<pre><code>@Controller
public class AddEmployee implements Runnable {
// instance variable having getter() and setter() method.
    String ss;

    @RequestMapping("/search")
    public String search(Model model, @RequestParam String text) throws InterruptedException {
        setSs(text); // setting value in ss
        AddEmployee r = new AddEmployee();
        Thread t = new Thread(r);
        t.start();
        return "listEmployee";
    }

    public void run() {
        System.out.println("$$$$$$$$$$$$$$$---&gt;"+getSs());// getting null here
    }

    public String getSs() {
        return ss;
    }

    public void setSs(String ss) {
        this.ss = ss;
    }
}
</code></pre>

<p>Thanks in advance.</p>