Dear Dave,
O.K. But when you look at this scenario:
MyFirstActionClass -> show first.jsp -> user click on link ->
MyFirstActionClass.method where I set session variable
(getSession().put("variable", new Boolean(true)); -> show second.jsp (here I
see my variable) -> user click on some link ->
MySecondActionClass.method->third.jsp (here I don't see my variable).
I should note that in MySecondActionClass.method I don't clear session or
something similar, I just add remove some other variables and set some new.
Why my session is obviously cleared when action from another namespace is
called ?
--
Thx, Milan
newton.dave wrote:
>
> I didn't say it wouldn't work. I, and the Sun documentation I quoted, said
> it was a known bad programming practice.
>
> Dave
>
> Milan Milanovic wrote:
>> Hi Dave,
>> no, I think that this is not an issue. I tried with Boolean.TRUE and it
>> is
>> the same, but I earlier used new Boolean(true) and that worked.
>> --
>> Milan
>> newton.dave wrote:
>>>
>>> --- On Thu, 7/31/08, Milan Milanovic wrote:
>>>> (getSession().put("variable", new Boolean(true));
>>>
>>> Use Boolean.TRUE rather than instantiating a new object.
>>>
>>> Note also that the Javadocs for Boolean state in big bold letters:
>>>
>>> "Note: It is rarely appropriate to use this constructor. Unless a new
>>> instance is required, the static factory valueOf(boolean) is generally a
>>> better choice. It is likely to yield significantly better space and time
>>> performance."
>>>
>>> Dave
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18756698.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18758095.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]