RE: How to retrieve session variables using Struts tag in JSP

2004-10-20 Thread Shabada, Gnaneshwer

I tried the first one but didn't work. All I am doing is checking for a flag
that I am setting in the session in my Action class like below..

Action Class:
session.setAttribute("loggedUser", "admin");

JSP:
 





 

and then trying to display my Delete button if the accesslevel is "1" and if
this flag is "admin". When I do this, I get an error saying 


[10/20/04 9:53:18:165 EDT] 618b279f WebGroup  E SRVE0026E: [Servlet
Error]-[Cannot find bean loggedUser in any scope]:
javax.servlet.jsp.JspException: Cannot find bean loggedUser in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:1038)
at
org.apache.struts.taglib.logic.MatchTag.condition(MatchTag.java:179)


Can I use any other tag to describe both conditions in one tag or is the way
I am doing right?

TIA
Gnan

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 19, 2004 7:39 PM
To: Struts Users Mailing List
Subject: Re: How to retrieve session variables using Struts tag in JSP


If "loggedUser" is a string you put in session scope, use this instead:

  

If on the other hand you had a bean that you stored under session
scope under key "foo", and this bean class has a getLoggedUser()
method on it, you'd use:

  

The "parameter" attribute is for accessing request parameters that
came in from the client, not request or session attributes that your
applicaton stores.

Craig


On Tue, 19 Oct 2004 18:59:38 -0400, Shabada, Gnaneshwer
<[EMAIL PROTECTED]> wrote:
> 
> Hello,
> I am trying to retrieve a flag value ( that I put in session in my Action
> class ) in my JSP. I tried  tags and other struts tags but no
> luck. Can anyone point me which tag does this? I also used 
>  tags but no use.
> 
> I tried this where the parameter is the session attribute and "admin" is
its
> literal value.
> 
> 
> 
> Please help
> 
> TIA
> Gnan
> 
> 
> This email message is for the sole use of the intended recipient (s) and
may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. To reply to our email administrator directly,
send
> an email to [EMAIL PROTECTED]
> Toys "R" Us, Inc.
> 
> -
> 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]

 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to [EMAIL PROTECTED] 
Toys "R" Us, Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to retrieve session variables using Struts tag in JSP

2004-10-19 Thread Craig McClanahan
If "loggedUser" is a string you put in session scope, use this instead:

  

If on the other hand you had a bean that you stored under session
scope under key "foo", and this bean class has a getLoggedUser()
method on it, you'd use:

  

The "parameter" attribute is for accessing request parameters that
came in from the client, not request or session attributes that your
applicaton stores.

Craig


On Tue, 19 Oct 2004 18:59:38 -0400, Shabada, Gnaneshwer
<[EMAIL PROTECTED]> wrote:
> 
> Hello,
> I am trying to retrieve a flag value ( that I put in session in my Action
> class ) in my JSP. I tried  tags and other struts tags but no
> luck. Can anyone point me which tag does this? I also used 
>  tags but no use.
> 
> I tried this where the parameter is the session attribute and "admin" is its
> literal value.
> 
> 
> 
> Please help
> 
> TIA
> Gnan
> 
> 
> This email message is for the sole use of the intended recipient (s) and may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. To reply to our email administrator directly, send
> an email to [EMAIL PROTECTED]
> Toys "R" Us, Inc.
> 
> -
> 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]



How to retrieve session variables using Struts tag in JSP

2004-10-19 Thread Shabada, Gnaneshwer

Hello,
I am trying to retrieve a flag value ( that I put in session in my Action
class ) in my JSP. I tried  tags and other struts tags but no
luck. Can anyone point me which tag does this? I also used 
 tags but no use.

I tried this where the parameter is the session attribute and "admin" is its
literal value.



Please help

TIA
Gnan

 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to [EMAIL PROTECTED] 
Toys "R" Us, Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]