Skip to content
Advertisement

Is there a way to get HTTP request parameter using wildcard?

We have a service that get values from formData in http requests.

Some parameters are packaging1_1 or packaging1_2 or packaging1_3 etc

We are using the following code to get the parameter value from HttpServletRequest request

JavaScript

Is there any way to use the code with wildcard in the last number? e.g.

JavaScript

Advertisement

Answer

No, you can only get all the names and compare them on your own, like so:

JavaScript

And then get the values for all the filtered names.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement