/** * Calls the current servlets <code>init</code> method. Is automatically * done when calling {@link #createServlet}. */ public void init() { try { servlet.init(mockFactory.getMockServletConfig()); } catch(ServletException exc) { throw new NestedApplicationException(exc); } }
/** * Calls the current servlets <code>init</code> method. Is automatically * done when calling {@link #createServlet}. */ public void init() { try { servlet.init(mockFactory.getMockServletConfig()); } catch(ServletException exc) { throw new NestedApplicationException(exc); } }
/** * Calls the current servlets <code>init</code> method. Is automatically * done when calling {@link #createServlet}. */ public void init() { try { servlet.init(mockFactory.getMockServletConfig()); } catch(ServletException exc) { throw new NestedApplicationException(exc); } }
/** * Sets the specified servlet as the current servlet. * Initializes it, if <code>doInit</code> is <code>true</code>. * @param servlet the servlet * @param doInit should <code>init</code> be called */ public void setServlet(HttpServlet servlet, boolean doInit) { try { this.servlet = servlet; if(doInit) { servlet.init(mockFactory.getMockServletConfig()); } mockFactory.getMockFilterChain().setServlet(servlet); } catch(Exception exc) { throw new NestedApplicationException(exc); } }
/** * Sets the specified servlet as the current servlet. * Initializes it, if <code>doInit</code> is <code>true</code>. * @param servlet the servlet * @param doInit should <code>init</code> be called */ public void setServlet(HttpServlet servlet, boolean doInit) { try { this.servlet = servlet; if(doInit) { servlet.init(mockFactory.getMockServletConfig()); } mockFactory.getMockFilterChain().setServlet(servlet); } catch(Exception exc) { throw new NestedApplicationException(exc); } }
/** * Sets the specified servlet as the current servlet. * Initializes it, if <code>doInit</code> is <code>true</code>. * @param servlet the servlet * @param doInit should <code>init</code> be called */ public void setServlet(HttpServlet servlet, boolean doInit) { try { this.servlet = servlet; if(doInit) { servlet.init(mockFactory.getMockServletConfig()); } mockFactory.getMockFilterChain().setServlet(servlet); } catch(Exception exc) { throw new NestedApplicationException(exc); } }