Quoting Christopher Lenz <[EMAIL PROTECTED]>:
> Hi all,
>
> I want to propose some changes to the build process of the
> WebdavServlet, to
> make it possible to compile the servlet against the Servlet 2.3 API.
> Most
> importantly, we need versions of the classes XHttpServletResponseFacade
> and
> XHttpServletRequestFacade that have the methods that have been added in
> 2.3.
Yes, that was the problem.
The requirement to have the 2.2 API to build is definitely something I wanted
to get rid of.
> To achieve this, I've created two source files for each of the classes,
>
> appending 22/23 to their file names to identify the servlet-api version.
> The 22
> versions are unchanged, the 23 versions extend
> HttpServletRequestWrapper/HttpServletResponseWrapper and only override
> the
> methods actually used for the debug logging. The class names are
> identical.
Yes, indeed, I would also advocate using a filter for implementing the 2.3
version of the logger (since, well, it was added to the API for exactly that
purpose :)).
One of the advantage of doing that is that the logger should still work with
the next version of the servlet API.
> The build file chooses which version of the file is needed (using the
> servlet23.present property), copies the correct files and strips the
> 22/23
> suffix from the filename of the copies. Then during compilation the
> source files
> with the suffixes are excluded.
Ok.
> So this seems to be working fine here, but I'm not 100% sure if it is a
> clean
> enough solution. What do you think ?
Well, I don't see another one, except if we decide that the logger is a servlet
2.3 only feature (since conceptually, it's a hacked filter). If one of the two
versions isn't clean enough, it's definitely the 2.2 version.
Remy