int i = location.indexOf("?");
if (i > 0) {
//extract params from the url and add them to the request
Map<String, Object> parameters = ActionContext.getContext().getParameters();
String query = location.substring(i + 1);
Map<String, Object> queryParams = urlHelper.parseQueryString(query, true);
if (queryParams != null && !queryParams.isEmpty())
parameters.putAll(queryParams);
location = location.substring(0, i);
}