/** * <p>Instantiates a new instance of <code>ServletContextHashModel</code>.</p> * @return ServletContextHashModel */ public ServletContextHashModel getServletContextHashModel() { // build the servlet context hash model GenericServlet servlet = new GenericServletAdapter(); try { servlet.init(new DelegatingServletConfig(servletContext)); } catch (ServletException ex) { throw new BeanInitializationException("Initialization of GenericServlet adapter failed", ex); } ServletContextHashModel servletContextHashModel = new ServletContextHashModel(servlet, ObjectWrapper.DEFAULT_WRAPPER); return servletContextHashModel; }
/** * <p>Instantiates a new instance of <code>ServletContextHashModel</code>.</p> * @return ServletContextHashModel */ public ServletContextHashModel getServletContextHashModel() { // build the servlet context hash model GenericServlet servlet = new GenericServletAdapter(); try { servlet.init(new DelegatingServletConfig(servletContext)); } catch (ServletException ex) { throw new BeanInitializationException("Initialization of GenericServlet adapter failed", ex); } ServletContextHashModel servletContextHashModel = new ServletContextHashModel(servlet, ObjectWrapper.DEFAULT_WRAPPER); return servletContextHashModel; }