[TECH SUPPORT] LPS-50259 Freemarker theme doesn't work under non-root context

Hi Tina,

I am sending you this pull as per on Shuyang's request: https://github.com/shuyangzhou/liferay-portal/pull/741#issuecomment-56754284

Please review the changes.

Thanks,
Ákos