0

我有一个 html,我在其中动态生成具有相同名称的输入类型文本示例:-

<form method="post"
    action="http://localhost:8080/social/rs/polling/temp"
    enctype="multipart/form-data"id="save_poll"
    id="save_poll">



    <input type="text" style="width: 400px; height: 31px; line-height: 31px;" class="answer_textbox" id="answer_textbox1" name="topic">

    <input type="text"  style="width: 400px; height: 31px; line-height: 31px;"  class="answer_textbox" id="answer_textbox2" name="topic">

    <input type="button" value="Save" id="save" >

</form>

现在,我有一个泽西休息服务,我将接受这个文本框名称“主题”,但我不知道该怎么做?我尝试使用@FormDataParam("topic") List topic 之类的字符串列表以及@FormDataParam("topic") String [] 主题之类的字符串数组来获取它,但我仍然无法获取那些文本框字段,我在使用字符串列表时遇到的错误是“错误数量的争论”,对于字符串数组,我在主题数组中得到空值?请帮忙?

4

0 回答 0