Retrieving POST parameters from injected HttpServletRequest in a JAX-RS resources in JBoss EAP return null

Solution Verified - Updated -

Issue

I have a JAX-RS resource deployed into JBoss EAP and I inject the HttpServletRequest in order to retrieve the POST parameters from it. However, the attempt to retrieve it always results in null values. My code is as follows:

        @POST
        public void doPostTest(@Context final HttpServletRequest request){
            ...
        }               

How to fix that?

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content