Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Current URL from EL

jflackSep 14 2007 — edited Sep 17 2007
In 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2007
Added on Sep 14 2007
6 comments
2,561 views