I am developing a java RESTful web application. In one web page in particular I have, among the other components, a drop-down list:
<select name="source" id="source">
<option uri="http://localhost:9091/project/test/source/database" name="database" count="1">database</option>
<option uri="http://localhost:9091/project/test1/source/report2" name="report2" count="1">report2</option>
</select>
I would like to obtain, after the post request, the uri of the option selected by the user.
To get all the parameters to the POST method I wrote this:
@POST @Consumes(APPLICATION_FORM_URLENCODED) public Response mapDBSource(@FormParam("project") URI projectId, @FormParam("source") URI sourceId, @FormParam("dest_title") String destTitle, @FormParam("dest_graph_uri") URI targetGraph) throws WebApplicationException { Response response = null;
but the content of the URI Object SourceId is not the value of the uri, but just the name of the source. What is wrong with my code? How could I get the uri without showing it?
Thanks for your help.
Shouldn’t you use
instead of