Splash › Forums › Rewrite Users › Accessing current (rewritten) URL in JSF
Tagged: current, EL, jsf, rewrite, URL
This topic contains 2 replies, has 2 voices, and was last updated by Rafal G. 3 years, 6 months ago.
How can I access current page URL (already rewritten by Rewrite, not original URL) in JSF’s EL or directly in Java code?
have a look at the “How do I retrieve the original URL after a forward” section in the FAQ:
Basically you can use this code to get the original URL:
String url = request.getAttribute("javax.servlet.forward.request_uri");
Thank you very much Christian, it worked.
I didn’t look at most obvious place – FAQ 🙂
You must be logged in to reply to this topic.
Comments are closed.
If you find our tools useful, please consider making a donation to help us stay online and building software!