Advertisement
Guest User

Untitled

a guest
Sep 10th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. package com.mypkg;
  2.  
  3. import javax.ws.rs.*;
  4. import javax.ws.rs.core.MediaType;
  5. import javax.ws.rs.core.Response;
  6.  
  7. import com.sun.jersey.api.json.JSONWithPadding;
  8.  
  9. @Path("/json")
  10. public class JSONResponse {
  11.  
  12.     @GET
  13.     @Path("/test")
  14.     @Produces( {"application/x-javascript", MediaType.APPLICATION_JSON})
  15.     public JSONWithPadding getTestInJSON(@PathParam("callback") String callback) {
  16.         return new JSONWithPadding(new Object(), callback);
  17.     }
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement