You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by an...@freenet.de on 2007/06/19 08:55:21 UTC

Getting datas from session objects

Hello!

I've got an object, which has getter an setter methods, e.g.:

Object test
{
String foo="something";

public String getFoo() { return (foo;) }
public void setFoo(String foo) { this.foo=foo;}
}

The object is set to the session with rq.getSession().setAttribute("test",test);

The jsp uses the object like this:

<html:text name="test" property="foo"/>

The jsp is loaded correctly and works fine so far.
After I submitted the form (the jsp doesn't crash while submitting), I can see in the debug log, that the changed data is transfered - but I can't see it in the session test. 

Now the question:
How can I address the changed data in the ActionForm-class? Reloading the sessionobject test doesn't work - I just can see the old data again.


Thanks for your hint,
kind regards,
Andreas Hartmann



"Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken"
produkte.shopping.freenet.de/handy_voip_isdn/klarmobil/index.html?pid=73025


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Getting datas from session objects

Posted by Dave Newton <ne...@yahoo.com>.
--- andihartmann@freenet.de wrote:

> The jsp is loaded correctly and works fine so far.
> After I submitted the form (the jsp doesn't crash
> while submitting), I can see in the debug log, that
> the changed data is transfered - but I can't see it
> in the session test. 
> 
> Now the question:
> How can I address the changed data in the
> ActionForm-class? Reloading the sessionobject test
> doesn't work - I just can see the old data again.

All you've done is submitted a form--if you want to
change session data then in the action you're
submitting to you need to set the session data with
the new data from the form.

d.



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org