May be you are running into a problem reported here
http://java.net/jira/browse/JERSEY-749 ( as James Shaw mentioned in the
other thread).
I am able to see the entities just fine with standalone Grizzly web server.
Not sure what could be different with GlassFish though, which I believe
runs Grizzly as well, may be different versions.
GF 3.1.2.2 uses Jersey 1.11 btw, but I don't see problem with Jersey 1.11
(uses Grizzly 2.1.2) or 1.17 (uses Grizzly 2.2.16) when running with
standalone web server.
Here is my test which worked just fine:
curl -i --data '{"firstName":"Arul","lastName":"Dhesiaseelan"}' --header
"Content-Type: application/json" --header "Accept: application/json"
http://localhost:9998/people
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 24 Jan 2013 21:59:51 GMT
Content-Length: 92
{"firstName":"Arul","lastName":"Dhesiaseelan","uuid":"5257c460-e234-4626-8c42-5734c4eec746"}
On the server-side, I see these request logged.
Jan 24, 2013 11:59:51 AM com.sun.jersey.api.container.filter.LoggingFilter
filter
INFO: 12 * Server in-bound request
12 > POST
http://localhost:9998/people
12 > user-agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0
OpenSSL/0.9.8r zlib/1.2.5
12 > host: localhost:9998
12 > content-type: application/json
12 > accept: application/json
12 > content-length: 46
12 >
{"firstName":"Arul","lastName":"Dhesiaseelan"}
Jan 24, 2013 11:59:51 AM
com.sun.jersey.api.container.filter.LoggingFilter$Adapter finish
INFO: 12 * Server out-bound response
12 < 200
12 < Content-Type: application/json
12 <
{"firstName":"Arul","lastName":"Dhesiaseelan","uuid":"5257c460-e234-4626-8c42-5734c4eec746"}
-Arul
On Thu, Jan 24, 2013 at 7:05 AM, justin <justin.phillips_at_locusenergy.com>wrote:
> Ok,
> I'm checking server logs and I still don't see the entity logged on the
> request.
>
>
> 1 > POST http://localhost:4949/api/groups/
> 1 > user-agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
> OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> 1 > host: localhost:4949
> 1 > accept: application/json
> 1 > content-type: application/json
> 1 > content-length: 512
> 1 >
>
> I have jersey @ the latest version, and I am using glassfish 3.1.2.2. I
> had to follow the instructions here
> http://jersey.java.net/nonav/documentation/latest/glassfish.html
>
> If you're suggesting that there is something wrong with my build/deploy
> and have actually seen the entity logged in the request (basically my log
> above but with the json/xml) then i'll chalk it up to my build/deploy
> process and try to figure that out.
>
> Thanks again.
>
>
> On Thu, Jan 24, 2013 at 8:53 AM, Arul Dhesiaseelan <aruld_at_acm.org> wrote:
>
>> If you have this enabled, you should see the request logged on the
>> server-side. This works just fine for me. What version of Jersey you are
>> using?
>>
>> <init-param>
>> <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
>> <param-value>com.sun.jersey.api.container.filter.LoggingFilter</param-value>
>> </init-param>
>>
>>
>> -Arul
>>
>>
>> On Wed, Jan 23, 2013 at 7:45 AM, justin <justin.phillips_at_locusenergy.com>wrote:
>>
>>> Hey Arul,
>>> Thanks for the help. I toggled DisableEntitylogging to false but I still
>>> don't see the body of the request (which is the Entity right?) I toggled it
>>> to true, and saw that the response body no longer showed up in the logs.
>>> When I set it back to false, the response body came back to the log, but
>>> the request body still wasn't there (I'm doing a post). Is it not possible
>>> to log the request body out of the box?
>>> Thanks
>>>
>>
>>
>