For component which require the location of the application or context root, there are two ways to get it.