Search code examples
springjakarta-eespring-mvcspring-webflowspring-webflow-2

Reading query strings from GET inside Spring web flow


Hy.

Im continuing a spring web flow, using execution key. (an order paypal payment) and would need to read query strings from get. &TokenID and &PayerID

this is how the URL looks like where Paypal redirects user after confirming payment:

/sampleflow?execution=e1s1&_eventId=approved&token=EC5D7416956W8431713&PayerID=TN2RE8ZTH67JN

if eventID is approved, my flow redirects to a payment confirmed state. This part is working. I just need to get the query string parameters somehow.

Any way to do this?


Solution

  • I'm assuming you are trying to access the request parameters in the flow definition xml file. You can access the params using the EL variable requestParameters.

    <evaluate expression="someService.doSomething(requestParameters.TokenID, requestParameters.PayerID)" />
    

    http://docs.spring.io/spring-webflow/docs/2.3.x/reference/html/el.html#el-variable-requestParameters