Multiple cid param in POST url and url response

Splash Forums Rewrite Users Multiple cid param in POST url and url response

This topic contains 3 replies, has 3 voices, and was last updated by  ehills 1 year, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26885

    ehills
    Participant

    Hi Guys,

    We are using Jboss Eap 6.3, weld and jsf 2.1. What we are finding is that when posting to our action classes, the post url contains multiple cid params.

    For example we see:

    <form id=”some_id” name=”some_name” method=”post” action=”/somecontextroot/somepage?cid=4&cid=4″ enctype=”application/x-www-form-urlencoded” novalidate=”novalidate”>

    </form>

    Our post-redirect-get flows usually go as follows.

    Landing page -> action starts conversation -> land on page we want which has cid=x

    and at this point our post (if there is a post of course) contains two cids like you see above.

    If we navigate off this page, e.g. with a successful navigation then we only see one cid param in the url for the following page but again two cid’s in the post (if there is one).

    If the actions returns an error (e.g. returns null) then we are redirected back to the same page and we then have two cids in the url like so:
    https://www.example.com/somecontextroot/somepage?cid=4&cid=4

    the post on this page will then have 3 cid params and any subsequent returns to this page (because of returning null in the action etc.) a new cid param is appeneded.

    Does anybody have any ideas what could be the case of this issue and any possible work arounds?

    Thanks again,
    Ed

    #26891

    Some years ago I had a similar problem with PrettyFaces and MyFaces Orchestra. The problem back then was that Orchestra always appended a query parameter and was ignoring the already existing one. Not sure if this is a similar problem.

    I suggest to debug RewriteViewHandler.getActionURL(). I’m not sure if Weld uses ViewHandler.getActionURL() or HttpServletResponse.encodeURL() to add the parameter. Unfortunately the interaction between all theses components is very difficult to debug. 🙁

    #26892

    If it turns out to be a bug in Rewrite, we will be glad to fix it.

    You could also add a rule that rewrites outbound URLs and removes extra CID parameters (as a last resort.)

    #26952

    ehills
    Participant

    Hi Guys, thanks for the replies,

    It looks like its a problem with Weld and PrettyFaces together. (I just got a bit more time and have a demo which i will upload).

    I don’t know which is at fault but i am using Jboss eap 6.3.3 and according to: https://access.redhat.com/articles/112673

    the version of Weld is: 1.1.23.Final

    If someone has the skills and interest in testing pretty faces with this version of weld that would be amazing. Not sure how much time i will have to test this in depth and find what is at fault.

    Let me know if there is anything else i can offer that might help solve this problem.

    Cheers,
    Ed

    • This reply was modified 1 year, 5 months ago by  ehills.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.