Home JAX-RS Mixing @FormParam and MultivaluedMap<String, String> formParams
Reply: 0

JAX-RS Mixing @FormParam and MultivaluedMap<String, String> formParams

user6017 Published in September 19, 2018, 9:49 am

I've a method that returns all records sons of a father record (document and rows for example):

public Datasource<Son> getSonsFromParent( @FormParam(value = "idparent") Long idparent,
        MultivaluedMap<String, String> formParams) throws Exception;

I've a well known parameter, "idparent". I want to get this parameter simply using @FormParam . It's useful for exposing this method to other people: they know that a "idparent" is required.

Also, I have a number of undefined parameters for sorting and filtering my datasource, for example






The problem is : using @FormParam, the multivalue map is always empty.

How can i mix MultivaluedMap and @FormParam together ?

share|improve this question
  • Take a look here. It is an answer that can fit your needs. stackoverflow.com/questions/8413608/… – Mario Apr 18 at 17:36

1 Answer 1

active oldest votes
up vote 1 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.314145 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO