No one have any idea how to access session variable in jsp in this kind of
simple scenario ?

--
Milan


Milan Milanovic wrote:
> 
> So, scenario is like this:
> 
> MyFirstAction.method1 [put session variable] -> show first.jsp -> user
> click on link in first.jsp page -> show second.jsp -> user click on link
> in second.jsp -> MySecondAction.someMethod is called -> show third.jsp
> where this session test should be done.
> 
> I hope this helps.
> 
> --
> Thx, Milan
> 
> 
> Milan Milanovic wrote:
>> 
>> Hi,
>> 
>> just to note, I treid with this too: <s:if test="#session.your_variable
>> != null"> and it doesn't work.
>> I put my session variable in one action class, and then redirect to
>> another page which is connected to another action class. When that second
>> class method is runned, and resulting jsp is shown in that page I test
>> this. My both classes implements sessionAware.
>> 
>> --
>> Milan
>> 
>> 
>> 
>> Milan Milanovic wrote:
>>> 
>>> Well, this : <s:if test="%{#session.your_variable != null}"> doesn't
>>> work, event though my class implements sessionAware and I put my
>>> your_variable in session before displaying this jsp page.
>>> 
>>> I should note that I put that variable in one action class and then that
>>> <s:if> test is runned in jsp for another action class, but both classes
>>> implements sessionAware.
>>> 
>>> What can I do ?
>>> 
>>> --
>>> Thx, Milan
>>> 
>>> 
>>> 
>>> felipe.lorenz wrote:
>>>> 
>>>> Hummm.. Struts 1 or 2?
>>>> 
>>>> This code is to S2.
>>>> 
>>>> <s:if test="%{#session.your_variable != null}">
>>>> 
>>>>     do something
>>>> 
>>>> </s:if>
>>>> 
>>>> I didnt test it, so im not sure about the code.
>>>> 
>>>> But try it, and tell us.
>>>> 
>>>> Felipe Lorenz
>>>> 
>>>> On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic
>>>> <[EMAIL PROTECTED]>wrote:
>>>> 
>>>>>
>>>>> Hi,
>>>>>
>>>>> I need to test in jsp if some session variable is present, and based
>>>>> on
>>>>> that
>>>>> to
>>>>> show some struts view code or not. How can I do that ?
>>>>>
>>>>> --
>>>>> Thx, Milan
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.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]
>>>>>
>>>>>
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18752896.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]

Reply via email to