Greetings,
I have been using a HTTPServlet to get some POSTed data. I want to save
some information in the same directory on the server, so I do something
like:
from WebKit.HTTPServlet import HTTPServlet
class StoreSession( HTTPServlet ):
def respondToPost( self, transaction ):
input = transaction.request( ).fieldStorage( ).file.read( )
# This causes an error
localdir = self.serverSidePath( )
# This does not
# localdir = transaction.request( ).serverSidePath( )
# etc.
The error returned is (truncated):
File ".\WebKit\Servlet.py", line 72, in serverSidePath
self._serverSidePath = self._request.serverSidePath()
AttributeError: StoreSession instance has no attribute '_request'
I believe the problem is that Servlet.serverSidePath assumes _request
exists, which is only true if the Servlet class is actually a Page
instance (or derived from Page). If it is not (as in my above example),
this fails.
I do not know a simple fix (as Servlet.serverSidePath is not passed the
transaction), but I thought you should know.
I am using the Webware post 0.7 (from last week's CVS).
TJK
-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss