shibboleth-dev - Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet
Subject: Shibboleth Developers
List archive
- From: Chad La Joie <>
- To:
- Subject: Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet
- Date: Fri, 10 Dec 2010 08:54:12 -0500
- Organization: Itumi, LLC
Yeah, just define a bean of type String in the internal.xml. As the Servlet spec doesn't allow injection you can't have that info magically injected in to the Servlet but as Scott said you can add it to the list of beans exported to the Servlet context. Just add the bean ID as a value to the list for the shibboleth.ServletAttributeExporter at the bottom of the internal.xml file.
On 12/10/10 8:49 AM, Christopher Bongaarts wrote:
Brent Putman wrote:
Another way would be to use Spring. Just define the value as a Spring
bean (even a plain String can be a bean) in say internal.xml, and then
it's accessible from anywhere you can get at the Spring app context.
The "easy" way would be to just assume a fixed bean id and then just
hardcode that bean id in your LoginHandler's bean definition parser and
servlet init code. Servlet can get access to the Spring app context
using standard Spring conventions.
Can I get a quick one-liner/hint about how to do that?
I think I get how to define the bean in internal.xml and how to write
the bean class; what I'm looking for is how to get at it from the login
handler and servlet (or, from what I understand of how Spring works, how
to set things up so the values magically get injected into the right
spots).
By "even a plain String can be a bean" does that mean I can avoid
writing a specific bean class and its associated parser?
--
Chad La Joie
http://itumi.biz
trusted identities, delivered
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, (continued)
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Christopher Bongaarts, 12/07/2010
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Christopher Bongaarts, 12/07/2010
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Christopher Bongaarts, 12/07/2010
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Christopher Bongaarts, 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Paul Hethmon, 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Brent Putman, 12/07/2010
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Brent Putman, 12/07/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Christopher Bongaarts, 12/10/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Chad La Joie, 12/10/2010
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/10/2010
- Re: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Chad La Joie, 12/10/2010
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/07/2010
- RE: [Shib-Dev] Sharing configuration between LoginHandler and servlet, Cantor, Scott E., 12/07/2010
Archive powered by MHonArc 2.6.16.