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

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

user914 Published in July 21, 2018, 4:07 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 ?

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO