Skip to content
Advertisement

Tag: ajax

Redirect to another page with @RequestBody

I’m struggling with something. i pass JSON data to my controller In my RestController, i handle this information like this saving the JSON elements into the object myRequest. The thing is, having @RequestBody forces me to stay in that JSP, but i want to after processing this information, redirects to another page. Tried with various ways to redirect but the

resteasy: @QueryParam to parse nested array structure

I’m using a javascript library called tabulator to display data inside tables on the client side. The Tabulator js library provides a feature to encode a representation of filters in the query parameters of an ajax request. For example, here’s what the query params look like: https://host/myEndpoint?size=10&page=1&filters%5B0%5D%5Bfield%5D=username&filters%5B0%5D%5Btype%5D=like&filters%5B0%5D%5Bvalue%5D=filteredBy Here’s the same url decoded: https://host/myEndpoint?size=10&page=1&filters[0][field]=username&filters[0][type]=like&filters[0][value]=filteredBy If possible, I’d like to have a

Convert base64 string to image

I am trying to crop/resize user profile image using jquery plugin namely crop.js which sends user image as base64 via ajax to my controller as but I unable to decode this base64 string as Image,Can you guys guide me how can I save my base64 string as image on my server?. Answer This assumes a few things, that you know

How to pass an object from front-end to Struts 2

I am trying to send value of a field to Struts2 back-end through JavaScript but it returns NullpointerException. Once form is submitted the request will be sent to the following JavaScript method to be sent to back-end. the request will be created and sent as following But in back-end when I try to show the value it returns NullPointerException. Java:

Advertisement