Vincent Massol wrote:
>
> Note 1 : From the Servlet 2.2 API :
>
> " [...]
> To allow RequestDispatcher objects to be obtained using relative paths,
> paths which are not
>
> relative to the root of the ServletContext but instead are relative to the
> path of the current
>
> request, the following method is provided in the ServletRequest interface:
>
> . getRequestDispatcher
>
> The behavior of this method is similar to the method of the same name in the
> ServletContext,
>
> however it does not require a complete path within the context to be given
> as part of the argument to
>
> operate. The servlet container can use the information in the request object
> to transform the given
>
> relative path to a complete path. For example, in a context rooted at '/', a
> request to
>
> /garden/tools.html, a request dispatcher obtained via
>
> ServletRequest.getRequestDispatcher("header.html") will behave exactly like
>
> a call to ServletContext.getRequestDispatcher("/garden/header.html").
So presumably this means we would need to take into account the
ServletURL that a test case thinks it is running from? otherwise calls
to getRequestDispatcher on a request may not work as intended - as won't
they then all be relative to the redirector servlet at
/test/ServletRedirector?
>
> [...] "
>
> Note 2 : We'll also need to provide support for getNamedDispatcher() method
> ...
Hmmm, the change ends up being more complicated than at first it
seems... isn't that always the case? ;)
Jari
--
Jari Worsley
Senior Programmer
Hyperlink Interactive Ltd