Reputation: 1548
I have a simple REST web service with Jersey, and I have only one resource class, named categorizer.
This resource will return a HTML form for a GET request. When the user fills this HTML form, it will send a POST request to the same resource class, i.e. categorizer. So my question turns to be how can I get the correct URL for action field in the HTML form, which is returned for the GET request. I wish this URL could be dynamic. In other words, it will work when it is deployed on different servers with different domain name (IP address).
Thanks for your help !
Upvotes: 1
Views: 652
Reputation: 1903
You can easily use JSP in conjunction with Jersey and dynamically create the HTML page you need. An example for this can be found on this page.
Hope this helps.
Upvotes: 1