users@jersey.java.net

Using _at_FormParam value to specify/call resource method

From: <shaper_at_sibmail.com>
Date: Thu, 15 Jan 2009 14:58:34 +0600 (NOVT)

Hello,

We have pack of front-end javascript code based on ExtJS library and we
are going to use Jersey in a project instead of own framework, so to
reduce the changes just want to extend easily Jersey. Is it possible to
implement through Jersey API the extension with functionality as shown
from the code below? Could you clarify in short the approach to
implementation the extension?


@Path("/query")
@Consumes("application/json")
@Produces("application/json")
public class QueryResource {

    @POST
    @FormParam(action=”postQuery”) // Action parameter value “postQuery”
in POST
    public void postQuery() {
      …
    }

    @POST
    @FormParam(action=”postQueryGroup”) // Action parameter value
“postQueryGroup” in POST
    public void postQueryGroup() {
      …
    }
}


Thanks in advance,
Dmitry S.