Yes, indeed. I got around it by retrieving the info using getClass(),
getField() etc.

Thanks again.

Rui

On Fri, 21 May 2004, Carl Howells wrote:

> Rui Zhang wrote:
> > Hi Jon & All,
> >
> >    Thanks for your information. It's very helpful. I've been looking at
> > ValveContext but did not find anything useful.
> >
> >    Yes, I tried to pass the info object along as an attribute of
> > ServletRequest. But problem occured with the retrieval of the object in
> > the Filter, where ServletRequest.getAttribute() successfully located my
> > attribute, but promtted a ClassCastException when the returned Object was
> > casted back to the original info class. It seems Tomcat somehow lost the
> > class structure of the original info class...? Anyone got a clue of this?
>
> Sounds like a ClassLoader problem.  The valve is going to use tomcat's
> libraries.  The filter will use the webapps's libraries, in preference
> to tomcat's libraries.  If the class is in the webapp's libraries, it's
> going to try to cast it to an instance of the webapp version of the
> class, which will be different from the version the valve created.
> (Classes with different classloaders are different, even if they happen
> to be identical.)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to