hide extra parameter

Splash Forums PrettyFaces Users hide extra parameter

This topic contains 7 replies, has 2 voices, and was last updated by  Christian Kaltepoth 4 years, 11 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #27568



    I try to hide dummy parameter that I send on submit form.

    How to make works?

    eg /pages/view,xhtml?id=1&page=journal
    expected => /pages/view/1&page=journal
    actual => /pages/view/1?page=journal




    The query string is separated by the path using a ?. So the actual URL you posted is correct. You expected URL is incorrect.



    sorry my bad.

    I’m expecting => /pages/view/1

    actual => /pages/view/1?page=journal

    I’m trying to remove the page=journal but unfortunately I need to send it



    Could you explain “unfortunately I need to send it” a bit more?



    sorry. don’t border about ” “unfortunately I need to send it””.

    actually I send 2 parameters but I want only one of them show in url


    You cannot simply hide a query parameter if your application requires it. If it is not present in the URL, the browser won’t include it in the request and therefore your app won’t work.

    If you application does not require it, simply don’t send it.



    that why I said unfortunately. I need the extra parameter to send to managedbean but I don’t need it to show in url.

    but I tight with SEO url friendly

    “I’m expecting => /pages/view/1

    actual => /pages/view/1?page=journal”

    the seo url friendly just wanna to see /pages/view/1 without page=journal.

    can we achieve that with prettyfaces?




    As I said earlier: If you remove the parameter from the URL, the client won’t send it, so it won’t be available in your bean.

    Why don’t you just use a SEO URL like this:


    From the SEO perspective this is even better, because the term “journal” is part of your path.

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

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

Comments are closed.