How can i programmatically upload a file to a website?

后端 未结 5 1382
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 12:10

I have to upload a file to a server which only exposes a jsf web page with file upload button (over http). I have to automate a process (done as java stand alone process) wh

5条回答
  •  孤城傲影
    2020-11-28 13:13

    You could try to use HtmlUnit for this. It provides a very simply API for simulating browser actions. I already used this approach for similar requirements. It's very easy. You should give it a try.

提交回复
热议问题