Skip to main content

Glassfish 4.0 JAX-RS empty HTTP POST MultivaluedMap form parameters

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2009-07-14

Hi All,

I'd like to ask a question related to an issue I encountered with
Glassfish 4.0 Web application deployment.

I created a REST Web service application with JAX-RS and deployed it on
Glassfish 3.1.2 with no issue. Recently I tried deploying it on
Glassfish 4.0 and encountered a warning as follows.

A servlet request to the URI
contains form parameters in the request body but the request body has
been consumed by the servlet or a servlet filter accessing the request
parameters. Only resource methods using @FormParam will work as
expected. Resource methods consuming the request body by other means
will not work as expected.

I use to store the form parameters, but
it is indeed empty for HTTP POST requests. Strangely, it is not empty
for HTTP PUT requests. I have tried searching for solutions on the
Internet but got stuck (in the worst case I can fallback to Glassfish
3.1.2 deployment of course).

Code snippets:

public String publishToAnInformationChannel(@PathParam("infoId") String
MultivaluedMap formParams, @Context SecurityContext sc) {
// formParams empty + warning

public String updateAnInformationChannel(@PathParam("infoId") String
MultivaluedMap formParams, @Context SecurityContext sc) {
// formParams filled in + no warning

If anyone knows how to solve this issue, please let me know. Thanks a

Best regards,