Appending # at end of URL

Splash Forums PrettyFaces Users Appending # at end of URL

This topic contains 4 replies, has 3 voices, and was last updated by  Lincoln Baxter III 9 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #18891


    I have this url mapping

    <url-mapping id=”guruProfile”>

    <pattern> /profileee/#{id}/#{keywords}</pattern>

    <view-id> /myPage.html</view-id>


    myPage.html needs #aboutme appended at the end to display the data correctly

    How can I append #aboutme at the end in <view-id> /myPage.html</view-id>



    actually I don’t know if this is currently possible. Did you try <view-id>/myPage.html#aboutme</view-id>? What error do you get?




    If I append #aboutme at end, it tries to find a page with #aboutme

    The message says, requested resource not available



    I don’t think this will work at all. The anchor (the string after #) is interpreted by the browser and used to scroll to the correct position in the document. So it doesn’t make any sense to have an pretty URL without an anchor and forward it to a resource with an anchor.


    Yes, if you need to add an anchor to outbound URL links, then it probably makes most sense to add the anchor directly in the link itself. The <pretty:link> component has an “anchor” attribute for this purpose, and I believe other components have similar features (or should have.)

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

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.