This example demonstrates how to implement a support for HTTP TRACE method via HttpMethod annotation in Jersey.
Using HttpMethod annotation you can implement whatever name of an HTTP method you want.
The mapping of the URI path space is presented in the following table:
URI path | Resource class | HTTP methods |
---|---|---|
/tracing/annotated | TracingResource | TRACE |
/tracing/programmatic | --- | TRACE |
You can trace your annotated resource using this command:
curl -v -X TRACE http://localhost:9998/base/tracing/annotated
or programmatic resource:
curl -v -X TRACE http://localhost:9998/base/tracing/programmatic
Run the example as follows:
mvn clean compile exec:java
This deploys the example using Grizzly container.