How to call REST API when html form is submitted?
This is not wht I want to know, it is all about writing client for calling REST URI's.
Parag
2010-10-15 11:21:01
A:
As far as I understand what you are asking is Obviously what you ask is for is not even about java. If i'm correct, what you want to do is generate some html form from a jsp, and on submitting that form, submit it to a rest service.
So basically, you should be looking at how to write a javascript to do that. Write some javascript to trigger on form submit, which would post the form to the rest service. (it will be easy if the rest service communicates with json because javascript loves json)
Roshan Amadoru
2010-10-15 12:25:39
What's wrong with the POST that the HTML form does? Why do you need JS?
Darrel Miller
2010-10-15 12:36:30
oh hell.. well. yeah, you don't need JS at all. Just set the target of the form to the rest service and it should be good to go.. What I was initially having in mind is that mainly rest services comes with authentication requirements and what not. So that's why i have suggested JS. But reading again, JS is not required at all for this use case.
Roshan Amadoru
2010-10-15 18:31:15