taglibs and application context

2002-07-02 Thread Andreas Hirner

Hello,

I have set an attribute like this:

request.setAttribute(Constants.VARIABLE_KEY, variable);

now I would like retreive that variable in a taglib. But if call it
via

variable =
(String)pageContext.getServletContext().getAttribute(Constants.VARIABL
E_KEY);

the variable is null

Waht's wrong?

Thanks
Andreas



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




R: taglibs and application context

2002-07-02 Thread Alessio Fiore

Hi Andreas,

the problem is that you put an attribute in the request and then you get it
from the  context... you should, instead, get it from the request, so:

request.setAttribute(Constants.VARIABLE_KEY, variable);

...

variable =
(String)pageContext.getRequest().getAttribute(Constants.VARIABLE_KEY);


Regards
Alessio
[EMAIL PROTECTED]

-Messaggio originale-
Da: Andreas Hirner [mailto:[EMAIL PROTECTED]]
Inviato: martedì 2 luglio 2002 16.24
A: Tomcat Users List
Oggetto: taglibs and application context


Hello,

I have set an attribute like this:

request.setAttribute(Constants.VARIABLE_KEY, variable);

now I would like retreive that variable in a taglib. But if call it
via

variable =
(String)pageContext.getServletContext().getAttribute(Constants.VARIABL
E_KEY);

the variable is null

Waht's wrong?

Thanks
Andreas



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



- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation. 



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