>
>In order to test methods that uses getServletContext() or getServletConfig()
>or any method inherited from GenericServlet, you have to initialize the
>servlet first by executing :
>
>public void testDoGet() throws Exception
>{
>          CentralLoggingServlet servlet = new CentralLoggingServlet();
>          servlet.init(config); // Needed to initialize the servlet config
>object
>          servlet.doGet(request, response);
>}


Thanks - I'll fix the code to include this!



>This is described in the Jyve FAQ (which is unfortunately not working
>currently) and there is a sample on how to do that in the Cactus Sample (in
>package org.apache.commons.cactus.sample, class SampleServletConfig and
>TestSampleServletConfig) if you wish to have a look.
>
>Where do you think I should describe this on the web site so that users will
>see it right away ? In a FAQ page on the web site as it was before ? In the
>"Servlet Sample" web page ?


Both perhaps? I think it should definitely be in the sample page, though.


Jim





--

                           *   Jim Cheesman   *
             Trabajo: [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
               Personal: [EMAIL PROTECTED] (34) 606 770 244
              Practice safe eating -- always use condiments.













Reply via email to