/** * Creates new {@link Madvoc} @{link WebApplication} that is configured * by context init parameters. */ public void contextInitialized(ServletContextEvent servletContextEvent) { ServletContext servletContext = servletContextEvent.getServletContext(); madvoc = new Madvoc(); madvoc.configure(servletContext); madvoc.startNewWebApplication(servletContext); }
/** * Filter initialization. */ public void init(FilterConfig filterConfig) throws ServletException { ServletContext servletContext = filterConfig.getServletContext(); madvoc = Madvoc.get(servletContext); if (madvoc == null) { madvoc = createMadvoc(filterConfig); try { madvoc.startNewWebApplication(servletContext); } catch (Exception ex) { throw new ServletException("Unable to start Madvoc web application.", ex); } } log = Log.getLogger(MadvocServletFilter.class); madvocController = madvoc.getMadvocController(); }