J
Joerg Gippert
Hi everyone!
I have an action servlet, that takes an attribute out of the request,
changes it and puts it back into the request. Now I´m wonderring, if I have
to remove the old attribute first, using removeAttribute() or if the API
simply overwrites any existing attribute if the same name is used.
E.g
Myobject o = (Myobject)request.getSession().getAttribute("MYATTRIBUTE")
o.changevlaue = "bla";
request.getSession().setAttribute("MYATTRIBUTE");
or do I have to do a request.getSession().removeAttribute("MYATTRIBUTE")
before I set the new one?
Thanks for any hint!
Regards,
Joerg
I have an action servlet, that takes an attribute out of the request,
changes it and puts it back into the request. Now I´m wonderring, if I have
to remove the old attribute first, using removeAttribute() or if the API
simply overwrites any existing attribute if the same name is used.
E.g
Myobject o = (Myobject)request.getSession().getAttribute("MYATTRIBUTE")
o.changevlaue = "bla";
request.getSession().setAttribute("MYATTRIBUTE");
or do I have to do a request.getSession().removeAttribute("MYATTRIBUTE")
before I set the new one?
Thanks for any hint!
Regards,
Joerg