Method to get spring applicatin context from JSF
if(userAcctService == null){
ServletContext servletContext =
(ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext();
ApplicationContext appContext =
WebApplicationContextUtils.getWebApplicationContext(servletContext);
//WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext((ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext());
userAcctService = (UserAcctService)appContext.getBean("httpInvokerProxy");
}
Tuesday, August 14, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment