Railo News
- May 14, 2012
- Improve performance by turning off Scope Cascading
Scope cascading, also known as scope precedence helps inexperienced programmers by permitting a shortened syntax for variable names. However, scope cascading slows down performance as the server must cycle through the different possible scopes when evaluating a variable.
In Railo scope cascading can be turned off. Just navigate to scope in the Railo Web Administrator and select the corresponding search option.
Here is an example: The following notation be found in many code examples and leads to a Railo runtime error depending on the setting in the Railo administrator.
index.cfm <cfoutput>#id#</cfoutput> Setting in the Railo Administrator Strict Template call http://training/index.cfm?id=12 Result Railo output Railo [3.1.2.001] - Error (Expression)
Message variable [id] doesnt exist
Context The Error Occurred in
D:\Projects\training\index.cfm: line 1
Code 1: <cfoutput>#id#</cfoutput>
Java Stacktrack variable [id] doesnt exist
at railo.runtime.type.scope.AndefinedImpl.get(Unknown Source):-1
at index_cfm.call(index_cfm.Java:29):29
at railo.runtime.PageContextImpl.include(Unknown Source):-1
at railo.runtime.PageContextImpl.execute(Unknown Source):-1
…
The error can be fixed in two different ways. You either change the setting in the Railo administrator or you change the code inside the index.cfm-file.
index.cfm <cfoutput>#url.id#</cfoutput> Setting in the Railo Administrator: Strict Template call http://handbuch/index.cfm?id=12 Not only is the code easier to read, but it is more performant as since the Railo does not need to scan the different scopes for the variable id.
- May 7, 2012
- Configure contexts individually
Railo Server creates a new web context for every website running on the same Railo instance. And since you have an individual web administrator available for each website, you can define different settings for each website which for instance allows you to configure two websites that they run in two time zones. This often helps if you host websites from different time zones. A simple change in the administrator gives you the ability of two websites hosted on the same server and even the same instance that run in different time zones. So the now() function then returns the corresponding time of the local time zone.
In addition there is no way how other web contexts (websites) can access or read the settings, datasources, mappings etc. from a different context. If you want that, just use the server administrator.
- April 30, 2012
- Difference between the web and the server admin
This is a feature in Railo that confuses new Railo users very often. Railo comes with two types of administrators. In fact there are two type of administrators for every website you host on a system. In Railo all the settings you make in the Railo Web Administrator affect only the website you are calling it from. So if you for instance call http://www.example.com/railo-context/admin/web.cfm you will only change the settings for www.example.com. This means that all the settings are inside a sandbox if you use the web administrator only.
If, on the other hand, you want to change settings for all websites that are running on the same instance of Railo, you need to use the Server Administrator since it allows you to set global datasources or global mappings that are affecting all the websites in that context.
So whilst your local settings are preserved and safe for your local website, you can still define global resources available to all of them.
Please remember that the settings in each context can be completely different and individual from context to context. This gives you a great flexibility and freedom.
Mark Drew's personal blog
- February 29, 2012
- Railo Book Competition: The Winners!
A couple of weeks ago I run a competition to win my Railo 3 Beginner's Guide book. So now is the time to announce the winners!
In first place is Ben B. who wins a signed copy of the book for his myth "The cost for creating a cfc object is minimal and has no real cost."
In joint second place, winning an electronic copy of the book are:
Ray V. with his myth "Is there really a cookie called CFMagic?"
and
Steven R. with his myth "ColdFusion will always timeout to the value I provide in the ColdFusion Adminsitrator."In third place, winning a mention in my presentation is Brendan with his myth "cfml produced html is full of whitespace"
Congratulations to you all! I shall get the presentation updated for cf.Objective!
I have also put the code up on how I run the code and presentation on github, so you can check out the CFML Mythbusters presentation for yourself!
- September 26, 2011
- CFCamp 2011! Be there or be a Pretzel!
Munich! City of Oktober fest and Pretzels! The big soft ones with butter inside. What could be more delicious than that? I tell you what is... CFCAMP 2011 is!
That's right ladies and gentle-folks, after a three year hiatus, there is going to be a stomping and knowledge-infusing conference in Munich this year, filled to the gills with awesome presenters and me!
For a measly €90 a ticket (going up to €119 in October, so get them whilst they are fresh!), your mind can be blown by the likes of Charlie Arehart (he of the inside secrets into ColdFusion 10!), Luis Majano (he of the mobile knowledge), Gary Gilbert exposing his JQuery to the public, Bilal Soylu will also be locking down your apps, and of course Andy Allan and myself, giving it all from our presenter's pulpit.
Sure you can't miss this?!
Head over to
http://www.cfcamp.org/anmeldung.cfmhttp://www.cfcamp.org/registration.cfm?ChangeLanguageTo=en to get your tickets (yep, it's in German, just use Chrome and translate it, you are a clever person right?This time in English! Don't say we don't spoil you!)
- August 22, 2011
- Checking the memory of your applications in Railo 3.3.0.026 rc
If you have ever wondered how your memory is being used in a Railo Server application, why not get the latest development release of Railo Server: 3.3.0.026 rc (you know that you can do this from the server administrator right?).
Just go to http://yourdomain/railo-context/admin/server.cfm and log in, then you can click on the "update" button, set the updates to "Development", update and then click the "execute button below to get the latest update.
Once you have done that, in the Railo Server Administrator screen, you will see info about your installation and scrolling down you will get a nice graphic on how your memory is being used, like the example below:
Yet another handy feature of Railo Server! Nice!


.png)

