From: Matt Feifarek <mattf@pa...> - 2002-08-05 20:25:39
I'm trying to use Page.callMethodOfServlet(), and I've noticed that inside
of the called method, "self" actually corresponds to the "secondary" servlet
(the one who's method is being hijacked) rather than the actual called
Is this by design, or is it a bug? I understand that it's a bit iffy, but it
kinda breaks a lot of things.
For example, let's say a method checks on some things, and sets a dirty flag
if those things pass some test:
self._dirty = 1
self._dirty = None
If one runs the servlet that contains this method (proxy), it will work as
However, if one runs ANOTHER servlet, and uses the callMethod feature (as
illustrated in main), it doesn't work "as expected".
The _dirty flag will be set inside of the proxy class, and not inside of the
actual "real" servlet, making using the method effectively impossible.
So, any code that uses self for anything (which is a lot, IMO) won't work.
I realize that this whole concept is something of a hack, but I think it's a
valuable one, and I just want to explore this.