I want to pass like a parameter an Array to RESTful webservice with Jersey. I have one mutiple select form where users can select multiple options. Then i pass the selected values using AJAX to the RESTful webservice.
That's the select:
<select id="u" multiple class="form-control">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
The jquery js:
$('#send').on('click', function() {
$.ajax({
url: "/pc/ws/ms/save-options",
contentType: "application/x-www-form-urlencoded",
cache: false,
type: "POST",
data: {
ur: $('#u').val()
}
});
});
I don't know how to indicate on the web service method receive is a array