Capturing parameters appended to the DWR3 query string?
I have a method called myMethod
which maps to the following开发者_高级运维 DWR method:
List<MyObject> myMethod(String param){
...
return myObjects
}
A library calls this method automatically by referring to MyService.myMethod('value')
, but it also appends its own params, a
, and b
That is, the final request looks like this:
POST http://localhost:8080/application/dwr/jsonp/MyService/myMethod/value?a=5&b=6
Is there any way to capture the values of a
and b
easily through DWR?
You can get at the HttpServletRequest.
WebContext ctx = WebContextFactory.get();
ctx.getHttpServletRequest().getParam(...)
精彩评论