Outbound URL fixup rule

Splash Forums Rewrite Users Outbound URL fixup rule


This topic contains 5 replies, has 2 voices, and was last updated by  Christian Kaltepoth 8 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #19588

    Have found both PrettyFaces and rewrite very useful, but as always want to do a little more.

    There is a problem with webflow and view resolving that I want to workaround using rewrite:

    For some unknown reason webflow generates the URL:


    and should be


    have tried with CDN rule but cannot get the query in the resulting URL, also do not understand how to access request parameters so I can extract controller and flow information.

    Any pointer is appreciated, also have seen this problem if you try to integrate Spring MVC with Primefaces so a fix would be great! (I know this is no the root cause but I will help a lot!).



    Maybe this is not the best solution, have divided the problem in two rules.

    – As have not found how to get the controller and the flow in the outbound rule, just do a partial fixup with:


    This way I get an URL like http://server:port/app/flow/paramswhere “flow” is the constant I use for the next rule.

    – And also adding an inbund rule to finish the job:


    Still trying to figure out how to access the “Referrer” header to extract controller and flow values.

    The header referrer is in the “correct form”: http://server:port/app/controller/flow?execution=paramsso from there I could get the values to rebuild the URL.



    There is a Header condition that you could try to use to access the Referrer header.

    I don’t know WebFlow, and without having access to the application it is difficult to help here.

    However, it may be also an option to implement a custom condition/operation or rule. With this you can implement any behavior you want. There are a few examples for custom conditions and operations here:

    Rewrite Examples

    Let us know if you run into any problems.


    Have tried to use the Headercondition, but have not figured out how to bind the result to a variable, when I use the variable afterwards I get an exception.

    In this case I think the best solution is using only one outbound rule, but in that scenario I need access to the URL of the requested page, so I can fixup the URL’s that are included inside that page.

    Any pointers?


    Have this rule:


    Also, in a bean I have the correct values for controller/flow but have not found a way to bind them to a variable so the substitution reads as {p}/{controllerPath}?execution={execution}.



    I don’t have access to the code right now so I cannot look this up, but I think you can do something like:


    With myBean.myProperty beeing an EL expression pointing to the correct value.

    Does this work?

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

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

Comments are closed.