Tingle's Technology Notes

I am the Technical Lead for CDL Digital Special Collections, these are some notes of mine, views expressed are my own or the original author's and do not represent my employer. http://btingle.bitbucket.org/
Recent Tweets @tingletech
Posts I Like
Who I Follow
top 100 tags
Now you want to expose the same data using JSONP, allowing any HTTP
client to access your server data. The only change you need to do in
your code is to wrap the collection as a javax.ws.rs.core.GenericEntity and then to return a com.sun.jersey.api.json.JSONWithPadding
instead of the collection itself.

Jersey Featuring jQuery JSONP | Javalobby

… ” Notice also the response MIME type, defined as application/x-javascript and also as XML and JSON. This is a special hint about Jersey: you can have only one method returning several different MIME types. I’ve chosen to have a separated method for JSONP because it is experimental but I believe soon I will review that decision and unify all methods around the same code - keep that in mind if you are designing your own API.”