Jari Worsley wrote:
> 
> I am getting an error trying to use the latest build with the
> JspTestcaller class.
> 
> If i run some tests that use ServletTestCase first, then  run a
> JspTestCase it doesn't repeat.
> 

ok,

after actually looking at the code, the ServletRedirector has this in:
    /**
     * Initialize the logging subsystem so that it can get it's
configuration
     * details from the correct properties file. Initialization is done
here
     * as this servlet is the first point of entry to the server code.
     */
    static {
        LogService.getInstance().init("/log_server.properties");
    }

the problem is that to use JspTestCase you call the redirector.jsp page,
meaning this static code is never called, as the ServletRedirector
hasn't been loaded by the ClassLoader yet. That's why JspTestCases will
work if you call a ServletTestCase first.

Adding :
   
org.apache.commons.cactus.util.log.LogService.getInstance().init("/log_server.properties");
to the redirector.jsp page fixes it.

not sure if that's the best place to apply the fix, or if it should go
somewhere else for use by both jsp and servlet tests.

Jari

--
Jari Worsley
Senior Programmer
Hyperlink Interactive Ltd

Reply via email to