Current URL from EL
jflackSep 14 2007 — edited Sep 17 2007In ADF Faces is there an EL expression that will get me the URL or base URL of the current page?
I have some Javascript from an outside party (Google Maps to be specific) that wants my script to furnish the URL of an image. Relative addressing doesn't seem to work, I suspect that the script thinks it is relative to the .js file's location, not relative to my page. Hard coding the URL works fine, but I hate to do this - I'd have to change it upon deployment.
If I must, I will put the server's URL in a properties file, which gives me only one place the change will be needed on deployment. But is there an easier way? Something like #{facesContext.externalContext.somethingelse} sounds about right, but I've tried requestContextPath, requestPathInfo and requestServletPath - close, but no cigar.