How get the original Request URI from JSF ?

Splash Forums PrettyFaces Users How get the original Request URI from JSF ?

Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  ceefour 4 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18649

    ceefour
    Participant

    Hi,

    When using PrettyFaces, ((HttpServletRequest) ExternalContext.getRequest()).getRequestURI() returns the rewritten URI (i.e. /pages/show.xhtml instead of /show/123 )

    How do I get the original URI (i.e. the one shown in browser) ?

    Thank you.

    Hendy

    #22848

    Hey Hendy,

    you can use this code to get the original request URL:

    PrettyContext.getCurrentInstance().getRequestUrl().toURL()

    Christian

    #22849

    ceefour
    Participant

    Thank you Christian! You ROCK!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Comments are closed.