tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Legassick <>
Subject Re: getContextPath reflection tricks are broken
Date Fri, 16 Jun 2000 14:47:30 GMT
On Thu, Jun 15, 2000 at 01:26:54PM -0700, Craig R. McClanahan wrote:
> Is there a particular reason you are using getDeclaredMethod() instead of
> getMethod()?  The former looks like it only finds the method if it is actually
> declared in the "outermost" class, while getMethod() will find a superclass's
> implementation if need be.  It is worth trying, anyway.

I don't think there was any reason to use getDeclaredMethod rather than
getMethod - but neither work anyway as the issue is that the class being
reflected is not visible to us (HttpServletRequestFacade).

As it turns out the immediate fix is quite easy - reflect the
HttpServletRequest interface instead - although as Costin pointed out we
might be better off in the long run looking for a more efficient
solution in Turbine, or more likely dropping JSDK2.0 support at some

Sean Legassick

View raw message