solved ticket https://issues.jboss.org/browse/RAILO-2336
Merge branch '4.0' into '4.1'