As these values are equal for all applications on a certain server, it would be handy and a lot more managable to define these values on a higher level.
Is it possible to define a custom global variable in a startup script or global config file, and use it in Application.xml?
Not that I know of. You can alter the /conf/Application.xml file, and if all your applications use same configuration then don’t make a /conf/[app-name/Application.xml so that the /conf/Application.xml is used.
You can make configurable variables for application, vhost or server by adding Property settings to the Properties list of an Application.xml, VHost.xml or the Server.xml,