try this:
<s:if test="%{#session.user != null}">Logout</s:if>
It's stored in session and your attribute name is user per your previous
scriplet.
Beez
r 5347
-----Original Message-----
From: ashish chawre [mailto:[email protected]]
Sent: Friday, December 10, 2010 10:22 AM
To: Struts Users Mailing List
Subject: Problem using scriplet object in s:if tag
Hi list,
I am trying to use an object from scriplet to <s:if> tag for a
conditional display purpose.
Here is the code:
In jsp I am fetching user record from the session <%
UserDTO userDTO = (UserDTO)session.getAttribute("user");
%>
Now I like to show Logout label only if userDTO is avail <s:if
test="%{#userDto != null}">Logout</s:if>
It doesn't seem to be working out properly. Can anybody please point the
mistake I am doing.
Thanks in advance!
-- Ashish
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]