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 3 hours, 25 minutes ago.

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

    hairi11
    Participant

    HI.

    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

    Thanks.

    /Hairi

    #27569

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

    #27570

    hairi11
    Participant

    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

    Thanks

    #27571

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

    #27572

    hairi11
    Participant

    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

    #27573

    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.

    #27574

    hairi11
    Participant

    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?

    thanks

    /Hairi

    #27575

    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:

    /pages/journal/view/1
    

    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)

You must be logged in to reply to this topic.

Comments are closed.