Esempio n. 1
0
 def sleep(self, transaction):
     BaseServlet.sleep(self, transaction)
     self.session = None
     self.request  = None
     self._request  = None        
     self.response = None
     self.transaction = None
Esempio n. 2
0
 def sleep(self, transaction):
     BaseServlet.sleep(self, transaction)
     self.session = None
     self.request = None
     self._request = None
     self.response = None
     self.transaction = None
Esempio n. 3
0
    def awake(self, transaction):
        BaseServlet.awake(self, transaction)

        # a hack to signify that the servlet is being run directly from WebKit
        self.isControlledByWebKit = True

        self.transaction = transaction
        self.application = transaction.application
        self.response = response = transaction.response
        self.request = transaction.request

        # Temporary hack to accomodate bug in
        # WebKit.Servlet.Servlet.serverSidePath: it uses
        # self._request even though this attribute does not exist.
        # This attribute WILL disappear in the future.
        self._request = transaction.request()

        self.session = transaction.session
        self.write = response().write
Esempio n. 4
0
    def awake(self, transaction):
        BaseServlet.awake(self, transaction)
        
        # a hack to signify that the servlet is being run directly from WebKit
        self.isControlledByWebKit = True
        
        self.transaction = transaction        
        self.application = transaction.application
        self.response = response = transaction.response
        self.request = transaction.request

        # Temporary hack to accomodate bug in
        # WebKit.Servlet.Servlet.serverSidePath: it uses 
        # self._request even though this attribute does not exist.
        # This attribute WILL disappear in the future.
        self._request = transaction.request()

        
        self.session = transaction.session
        self.write = response().write
Esempio n. 5
0
 def serverSidePath(self, path=None,
                    normpath=os.path.normpath,
                    abspath=os.path.abspath
                    ):
     
     if self.isControlledByWebKit:
         return BaseServlet.serverSidePath(self, path)
     elif path:
         return normpath(abspath(path.replace("\\",'/')))
     elif hasattr(self, '_filePath') and self._filePath:
         return normpath(abspath(self._filePath))
     else:
         return None
Esempio n. 6
0
    def serverSidePath(self,
                       path=None,
                       normpath=os.path.normpath,
                       abspath=os.path.abspath):

        if self.isControlledByWebKit:
            return BaseServlet.serverSidePath(self, path)
        elif path:
            return normpath(abspath(path.replace("\\", '/')))
        elif hasattr(self, '_filePath') and self._filePath:
            return normpath(abspath(self._filePath))
        else:
            return None
Esempio n. 7
0
 def __init__(self):
     BaseServlet.__init__(self)
    
     # this default will be changed by the .awake() method
     self.isControlledByWebKit = False 
Esempio n. 8
0
    def __init__(self):
        BaseServlet.__init__(self)

        # this default will be changed by the .awake() method
        self.isControlledByWebKit = False