Railo Tip: Getting information about built in Tags and Functions

Posted by Mark Drew on code on March 31, 2011

Tagged under railo,getrailo

I am not sure people out there know this but Railo has four awesome functions that I use all the time, they are :

  • getFunctionList
  • getTagList
  • getFunctionData
  • getTagData

 

getFunctionList* and getTagList
These two functions will return a structure with all the functions or tags that are currently installed on the Railo server. For example, getFunctionList will return:

And getTagList will return:

getTagData and getFunctionData
Of course, this information in itself isn't amazing, since how do you know the arguments for each? This is where the getTagData and getFunctionData come in useful. For Example, if you want to get all the properties of say, the function ImageFilter (I created the FilterExplorer using this function), all you have to do is:

And you will get a nice struct with all the info:

The function getTagData is slightly different, in that you have to split out the namespace when calling it, so you have to call it as follows:

Which gets you all the attributes and documentation for the tag:

 

Simply using those tags, I have started a little project using CloudBees, ColdBox and of course Railo, that I shall show off a bit later.

* getFunctionList is also available in CF9




comments powered by Disqus