Outbound URL fixup rule
February 23, 2013 at 7:23 pm #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!).
ThanksFebruary 24, 2013 at 3:19 am #23460
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.
Thanks,February 24, 2013 at 6:16 am #23461
There is a
Headercondition 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:
Let us know if you run into any problems.February 24, 2013 at 4:21 pm #23462
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?February 24, 2013 at 10:46 pm #23463
Have this rule:
Also, in a bean I have the correct values for
controller/flowbut have not found a way to bind them to a variable so the substitution reads as
Thanks,February 25, 2013 at 6:19 am #23464
I don’t have access to the code right now so I cannot look this up, but I think you can do something like:
myBean.myPropertybeeing an EL expression pointing to the correct value.
Does this work?
You must be logged in to reply to this topic.