jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Wilkins <gr...@mortbay.com>
Subject Watchdog and Jetty3
Date Wed, 18 Oct 2000 14:35:21 GMT

Hi watchdog developers.

I'm currently using watchdog to test Jetty3 for 2.2 servlet compliance.
I'm using the CVS snapshot from 17 Oct

Firstly a small bug report:

In org/apache/tools/moo/servlet/ServletTest.java
The sos variable is set after the doTest method.
Thus if the doTest throws an exception the props.put fails as sos is
null.    Simple fix is to set sos before calling doTest (or test 
a container that never fails :-)


Of the 9 tests that I'm currently failing, one of them is:
  org.apache.jcheck.servlet.client.javax_servlet.ServletContext.GetContextTest

where you appear to try to get the following context:
   /servlet/tests.javax_servlet.ServletContext.GetServletContextTestServlet


This appears to be a path within the scope of the current context. My reading 
of the spec and java doc is that this method is used to get other contexts
and thus should be passed a uri INCLUDING the context.  From the javadoc:

    /**
     * Returns a <code>ServletContext</code> object that 
     * corresponds to a specified URL on the server.
     *
     * <p>This method allows servlets to gain
     * access to the context for various parts of the server, and as
     * needed obtain {@link RequestDispatcher} objects from the context.
     * The given path must be absolute (beginning with "/") and is 
     * interpreted based on the server's document root. 
     * 
     * <p>In a security conscious environment, the servlet container may
     * return <code>null</code> for a given URL.
     *       
     * @param uripath 	a <code>String</code> specifying the absolute URL of 
     *			a resource on the server
     *
     * @return		the <code>ServletContext</code> object that
     *			corresponds to the named URL
     *
     * @see 		RequestDispatcher
     *
     */
    public ServletContext getContext(String uripath);
    

Is this test correct?
Is this the correct forum to ask this question?

Thanks for the test suite, it is making life much easier.

regards



-- 
Greg Wilkins<gregw@mortbay.com>          GB  Phone: +44-(0)171-4394045
Mort Bay Consulting Australia and UK.    Mbl Phone: +44-(0)7775534369
http://www.mortbay.com                   AU  Phone: +61-(0)299772395

Mime
View raw message