Package org.glassfish.jersey.server
Annotation Type JSONP
-
@Target(METHOD) @Retention(RUNTIME) @Documented public @interface JSONPAnnotation can be used to define the JavaScript callback function name if the valid JSONP format is requested as an acceptablemedia typeof this request. At the moment only resource methods are supported to be annotated with this annotation. The acceptable JavaScript media types for JSONP compatible with this annotation are:- application/x-javascript
- application/javascript
- application/ecmascript
- text/javascript
- text/x-javascript
- text/ecmascript
- text/jscript
queryParam()) takes precedence over thecallback()value.
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.StringDEFAULT_CALLBACKDefault JavaScript callback function name.static java.lang.StringDEFAULT_QUERYDefault query parameter name to obtain the JavaScript callback function name from.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringcallbackName of the JavaScript callback function to which the JSON result should be wrapped into.java.lang.StringqueryParamIf set then the JavaScript callback function name is obtained from a query parameter with the given name.
-
-
-
-
queryParam
java.lang.String queryParam
If set then the JavaScript callback function name is obtained from a query parameter with the given name. If this query parameter is not present in the request then the value ofcallback()property is used as the JavaScript callback function name.- Default:
- ""
-
-