retrieving bean from webapplicationcontext?
Scott Battaglia
scott.battaglia at gmail.com
Thu Aug 31 11:15:02 EDT 2006
Kris,
The first thing I would try is not using the SafeDispatcherServlet. Its not
required and it only puts up a nice failure message (I actually remove it
for Rutgers deployments because it was just an extra layer that provided us
no benefit in production [or even in test really]).
-Scott
On 8/31/06, Kris Melotte <kris.melotte at expandedmedia.com> wrote:
>
> Hello,
>
>
>
> I want to add a custom servlet filter to my cas server.
>
> In that filter I want to retrieve the bean
> "ticketGrantingTicketCookieGenerator" which is defined in cas-servlet.xml.
>
>
>
> The bean can not be found via
> WebApplicationContextUtils.getRequiredWebApplicationContext(
> session.getServletContext()), probably because spring only looks in
> applicationContext.xml.
>
>
>
> Via RequestContextUtils.getWebApplicationContext(request).getBean("ticketGrantingTicketCookieGenerator",
> CookieGenerator.class) I receive an error that the request isn't
> associated with springs DispatcherServlet. This is probably because the
> SafeDispatcherServlet proxies for the DispatcherServlet.
>
>
>
> Is there a way how I can get access to this bean from my filter?
>
>
>
> Regards,
>
> Kris
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20060831/93e41e49/attachment.html
More information about the cas
mailing list