Firstly, you're unconditionally putting the same data into each session, so are you sure you're getting the same *instance* of that data, not just separate copies of the same data?

Actions should be instantiated for each request, so if your code is as simple as you've presented and you really are getting the same instance in different sessions, there must be something wrong with your configuration somewhere.

L.

Sawan wrote:
Hello experts,

I have following code...

JAVA class:
public class Support extends ActionSupport implements SessionAware
{
    protected Map<String, Object> session;
    public Map<String, Object> getSession() { return session; }
    @SuppressWarnings({"unchecked"}) public void setSession(Map session) {
this.session = session; }
}

Action class:
public class Child extends Support
{
  ArrayList alt = new ArrayList();
alt.add("Test"); public String execute() throws Exception
  {
    if ((ArrayList)session.get("obj")==null)
    {
     session.put("obj",alt);
    }
  }
}

I have run this code first time and set the "alt" for this session only. Now
I copied the link from the browser window and paste it in other machines
browser. But unfortunately I also got the SAME "alt" on other machine's
browser.

I was assuming that for each new browser it will generate a new session and
will set new alt for each session.

Can any expert help me for this issue...

Thanks in advance Sawan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to