-5

こんにちは、grails gsp に次のコードがあります

<form action="upload-script-url" method="post" enctype="multipart/form-data">
    <table class="table"style="width: 75%">
      <tr>
        <td>
            <span  style="font-weight: bold; ">Select the Source File:</span>
            <input size="75" type="file" id="payload" name="payload"/>
        </td>
      </tr>
      <tr>
        <td>
        <input type="submit" class="red" id="Run">Run</button>
        </td>
      </tr>
    </table>
    </form>

私はフォームパラメータを読みました: here
Are these right parameters in the html form?
選択したファイルからデータを読み取るにはどうすればよいですか? apache commons fileupload api を使用する必要がありますか?
ありがとう

4

2 に答える 2

2
request.getFile("payload")

CommonsMultipartFileを取得します

于 2012-02-27T11:46:41.947 に答える
0

(もう一度)実際にドキュメントを見るのに時間がかかる場合は、その方法がわかります...

于 2012-02-27T11:52:39.300 に答える