I'm trying to use the jsp beta wrapper to implement Kendo UI image browser and keep getting 406 response from the server.
I'm using Spring 3.1 and the Kendo editor is just an add-on to a functional project. Hibernate dao layer, etc. work fine, so I'm thinking dispatcher-servlet config is ok, I'm getting no runtime or compile errors.
I'm trying to get to the point where I can get a list of images from the server.
JavaScript configuration:
imageBrowser: {
transport: {
read: {
url: "/brush/imagebrowser/read.html" ,
dataType: "json"
},
destroy: "/brush/imagebrowser/destroy.html",
create: "/brush/imagebrowser/createDirectory.html",
uploadUrl: "/brush/imagebrowser/upload.html",
thumbnailUrl: "/brush/imagebrowser/thumbnail.html",
imageUrl: "/brush/art/upload/thm/"
},
path: "/art/upload/thm/",
fileTypes : ".png,.gif,.jpg,.jpeg, .JPG"
}
Controller:
@RequestMapping( value = {"/imagebrowser/read.html"}, method = RequestMethod.POST, headers="Accept=*/*", produces = "application/json")
public @ResponseBody List<ImageBrowserEntry> read(String path) {
List<ImageBrowserEntry> l = imageBrowser.getList( path );
return l;
}
Modifications in ImageBrowserDaoImpl:
private final String RootFolder = "/";
private final String CopyFolder = "/";
private final String PrettyName = "";
When I put a breakpoint in debugger on 'return l'
in the controller method I can see the list contains images as I'd expect.
I've added
org.codehaus.jackson:jackson-core-asl:1.9.1222
org.codehaus.jackson:jackson-mapper-asl:1.9.9
jars to project ( using IntelliJ 12 for IDE )
Through a little bit of trial and error I got to the 406 error, but beyond that it's looking a little hopeless.