Having the wrapper extend the HttpServletRequestWrapper (introduced in Servlet 2.3) resolves this - just need to remove the "dummy" methods.
Niall ----- Original Message ----- From: "Craig McClanahan" <[EMAIL PROTECTED]> To: "Struts Developers List" <[email protected]> Sent: Monday, March 14, 2005 4:11 AM Subject: Re: Compiling STRUTS and STRUTS-FACES with servlet 2.4 and jsp 2.0 > FYI, as soon as I apply some recent patches (to remove the wrapper > class) this whole area will become a non-issue for struts-faces. In > the general case, however, it is not currently feasible to create a > wrapper that works across 2.3 and 2.4 unless you're willing to do a > little work with Java reflection to transparently deal with the 2.4 > methods that are not there in 2.3 (and therefore you cannot delegate > to the underlying wrapper). > > Craig > > > > On Sat, 12 Mar 2005 09:16:39 -0500, Bill Siggelkow > <[EMAIL PROTECTED]> wrote: > > On 2005-03-11 00:25:35 -0500, Martin Cooper <[EMAIL PROTECTED]> said: > > > > > On Tue, 1 Mar 2005 09:11:28 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > >> Doing the simple version of a change like this will cause the wrapper > > >> class to not be compilable against a 2.2 or 2.3 version of the servlet > > >> API any longer, which is a particular problem for the standard Struts > > >> release. > > > > > > I don't believe that's the case. The current implementation of > > > MultipartRequestWrapper uses exactly the same technique that Ramiro > > > mentions to allow compilation against the Servlets 2.3 API. Adding > > > extra methods to the implementation class allows it to compile against > > > the newer API, while the methods become just ordinary class methods > > > when compiled against the older API. > > > > > > It's true that the dummy methods added to satisfy the newer API are > > > not useful (without the use of reflection, as you suggest below), but > > > that doesn't seem to have caused problems for people using the > > > Servlets 2.3 API while we've been dummying up the methods new to that > > > version over Servlets 2.2. > > > > Well, I ran into this the other day -- and while it seemed like I could > > just no-op (or wrapper) for the new methods in the Servlet API > > (getLocalAddr() etc.) there are other problems in the taglibs against > > the JSP API -- because JSP 2.0 introduces new classes like > > ExpressionEvaluator. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
