To provide more concise URLs to users, I use a servlet called index.py
to forward requests. I'm sure I didn't think this up myself, but I
cannot find it in the current docs.
from WebKit.HTTPServlet import HTTPServlet
class index(HTTPServlet):
def respond(self, trans):
trans.application().forward(trans, '/RealServlet' +
trans.request().extraURLPath() )
This has been working well for me except when I override
writeExceptionReport(), in which case I see this under the "Session"
heading of the exception report:
Uncaught exception while asking *servlet* to write report:
Traceback (most recent call last):
File "/Users/oliver/Webware-0.9.1/WebKit/Transaction.py", line 199, in writeExceptionReport
obj.writeExceptionReport(handler)
AttributeError: 'index' object has no attribute 'writeExceptionReport'
I think the 'index' object here is my redirecting servlet. Am I doing
something wrong here? Can anyone suggest a workaround? I tried to
follow the code in Transaction.py and Application.py, but I got lost in
a maze of little methods, all alike.
Oliver
|