Injecting FacesContext into spring bean?

Not sure, but in this particular case it's not needed. The ExternalContext#getSessionMap() is basically a facade to the attributes of HttpSession To the point, you just need to grab the HttpServletRequest in your Spring bean somehow and then get the HttpSession from it by HttpServletRequest#getSession() Then you can access the session attributes by HttpSession#getAttribute().

Not sure, but in this particular case it's not needed. The ExternalContext#getSessionMap() is basically a facade to the attributes of HttpSession.To the point, you just need to grab the HttpServletRequest in your Spring bean somehow and then get the HttpSession from it by HttpServletRequest#getSession(). Then you can access the session attributes by HttpSession#getAttribute().

I don't do Spring, but Google learns me that you could obtain it as follows: HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder. GetRequestAttributes()).getRequest(); Once done that, you can just do: Exception e = (Exception) request.getSession(). GetAttribute(AbstractProcessingFilter.

SPRING_SECURITY_LAST_EXCEPTION_KEY).

– mkoryak Dec 23 '10 at 4:22 On SO, I'm happy enough with a vote and a green mark.As to managed beans, they are stored as attributes of HttpServletRequest (request scope), HttpSession (session scope) and ServletContext (application scope) as well by their managed bean name as key. You know, JSF (and Spring) just runs on top of "raw" Servlet API. – BalusC Dec 23 '10 at 4:25.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions