log.info("ApplicationStartupListener:processEvent");
if (event instanceof PostConstructApplicationEvent)
{
Application app = ((PostConstructApplicationEvent) event).getApplication();
if (!(app instanceof FacesApplication))
throw new AbortProcessingException("Error: Application is not a "+FacesApplication.class.getName()+" instance. Please create a ApplicationFactory!");
// Create and Init application
ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
FacesApplication jsfApp = (FacesApplication)app;
jsfApp.init(servletContext);
// Set Servlet Attribute