Fork me on GitHub Fork me on GitHub

application


<%
    //Putting a property to the application context
    application.put('bar', {'name':'jaggery'});

    print(
    //reading a property from application context
    application.get('bar')
    );
 
    //Removing a property from application context
    application.remove('bar');
%>

Overview

Object that holds properties which are global to the entire application.


Operations

Operation Returns Description
get('propName')Object
application.get('foo')
Returns the value (object) associated with the property
put('propName', value)None
application.put('foo', {'name':'jaggery'})
Adding a value to the application context
remove('propName')None
application.remove('foo')
Removes a property from application context
serve(function(request,respond,session){})String | Object
application.serve(function(request,respond,session){})
Serve function from application context