Actually - RequestDispatcherProvider does save all request parameters as HTTP attributes, except that when it saves them as attributes it tries to be smart and if a query has more than a single value it appends an "Array" suffix to the attribute name, example, if we have
?a=a1

then the provider does request.setAttribute("a", "a1")

and in case of

?a=a1&a=a2

it does

request.setAttribute("aArray", new String[]{"a1", "a2"})

It does it only for query and matrix parameters, I think this in itself has to be fixed and the multivalued URI parameters should always have their values saved as String[], to be consistent with the fact that in case of HTTP parameters, getParametersMap returns a Map with String[] values

Do you have single or multi-value query parameters ? In the former case it should work - in the latter too - though the current convention of needs to be dropped and the code fixed as suggested above

Cheers, Sergey

Hi
On 03/04/13 22:52, harrisgilliam wrote:
I am using Tomee+ 1.5.1 which bundles CXF 2.6.3. I have configured
RequestDispatcherProvider as a provider..

dispatcherName = "jsp"
useClassNames = true
saveParametersAsAttributes = true

It correctly redirects the response object to a JSP for processing but
none
of the query parameters are saved in the HttpServletRequest so they
are not
available to the JSP.

According to http://cxf.apache.org/docs/jax-rs-redirection.html these
parameters should be available and as attributes when
saveParametersAsAttributes = true

Any ideas what wrong ?

This is a bug - I can see they are still saved as HTTP parameters - I'll
get that fixed, please watch
https://issues.apache.org/jira/browse/CXF-4944

Thanks, Sergey




--
View this message in context:
http://cxf.547215.n5.nabble.com/RequestDispatcherProvider-not-saving-QueryParameters-in-HttpServletRequest-tp5725789.html

Sent from the cxf-user mailing list archive at Nabble.com.


Reply via email to