"Geir Magnusson Jr." wrote:
>
> jeff wrote:
> >
> > Daniel Rall wrote:
> > >
> > > [EMAIL PROTECTED] writes:
> > >
> > > > @@ -454,9 +457,11 @@
> > > >
> > > > /*
> > > > * put the request/response objects into the context
> > > > + * wrap the HttpServletRequest to solve the introspection
> > > > + * problems
> > > > */
> > > >
> > > > - context.put( REQUEST, request );
> > > > + context.put( REQUEST, new HttpServletRequestWrap( request ) );
> > > > context.put( RESPONSE, response );
> > >
> > > Ahhh...would you mind elaborating? :)
> >
> > I can attest to this bug. The class used by Tomcat to implement
> > HttpServletRequest can't be accessed directly in Velocity because it
> > somehow resists introspection. However, I have had exactly the same
> > experience with HttpServletResponse. Geir, is there some reason why
> > you've wrapped request but not response?
>
> I wanted to go to bed, and figured I would save writing another exciting
> gazillion-method wrapper class for another day, so spread out the
> enjoyment. :)
>
> I am working on the response right now...
>
> >
> > I wonder if this is a bug in the JVM or if there is some other
> > explanation.
>
> I am not 100% sure, but I think it is because the class that implements
> the interface is default or private (I don't remember - I looked when
> this was first reported a while ago...)
Even so, it seems like a JVM bug if the class is implementing a public
interface. Is there some special Java rule that says "introspection no
worky if the implementing class is not public"?
Hmmm, now that I think about it, implemention might be more difficult
wrt security models if introspection had to take interfaces into
account.