Matt Raible wrote:
You should be able to get the WebApplicationContext from the ServletContext.

In the end that's what this solution does, too, but it seems simpler to me: If you implement SimpleTag (for example, by extending SimpleTagSupport) you can get the pageContext from getJspContext(), and then the WebApplicationContext from WebApplicationContextUtils.getWebApplicationContext().

Like so:

UserManager userManager = (UserManager) WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext()).getBean("userManager");

-Dale

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

Reply via email to