Java RESTful Web アプリケーションを開発しています。特に 1 つの Web ページには、他のコンポーネントの中でもドロップダウン リストがあります。
<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>
投稿リクエストの後、ユーザーが選択したオプションの uri を取得したいと思います。すべてのパラメーターを POST メソッドに取得するために、次のように記述しました。
@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;
ただし、URI オブジェクト SourceId の内容は uri の値ではなく、単なるソースの名前です。コードの何が問題になっていますか? 表示せずに uri を取得するにはどうすればよいですか? ご協力いただきありがとうございます。