예제 #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
예제 #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
예제 #3
0
 def sleep(self, transaction):
     Servlet.sleep(self, transaction)
     self._session = None
     self._request = None
     self._response = None
     self._transaction = None
     self.field = None
     self.fields = None
     self.hasField = None
     self._exception = None
예제 #4
0
 def awake(self, transaction):
     Servlet.awake(self, transaction)
     self._transaction = transaction
     self._response = transaction.response()
     self._request = transaction.request()
     self._session = None  # don't create unless needed
     self._messagesDisplayed = 0
     self._contentAction = None
     self._exception = None
     self.field = self._request.field
     self.fields = self._request.fields
     self.hasField = self._request.hasField
     assert self._transaction is not None
     assert self._response is not None
     assert self._request is not None
예제 #5
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
예제 #6
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
예제 #7
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
예제 #8
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
예제 #9
0
    def __init__(self):
        BaseServlet.__init__(self)

        # this default will be changed by the .awake() method
        self.isControlledByWebKit = False
예제 #10
0
 def __init__(self):
     BaseServlet.__init__(self)
    
     # this default will be changed by the .awake() method
     self.isControlledByWebKit = False 
예제 #11
0
 def __init__(self):
     Servlet.__init__(self)
     self._methodForRequestType = {}  # a cache; see respond()
     if not hasattr(self, '_title'):
         self._title = self.__class__.__name__
     self.exc = ExceptionGetter(self)