In this tutorial we will show how to inject web application elements (form parameters, query parameters and more) into a RESTful Web service.You can use the following annotations to bind HTTP requests to a RESTful web service:
@FormParam
@PathParam
@QueryParam
@HeaderParam
@CookieParam
@MatrixParam
Let's explore all the possible interactions.
@FormParam
The annotation @FormParam can be used to inject the parameters of a Web form into a RESTful Web service.
Here we are submitting a POST request containing two parameters email and password which
are translated into the parameters "e" and "p" of the login method.