Primefaces 3.4.2 "文件上传"的总结
(1)Jars
添加public class FileUploadController { private UploadedFile uploadedFile; public FileUploadController() { } public UploadedFile getUploadedFile() { return uploadedFile; } public void setUploadedFile(UploadedFile uploadedFile) { this.uploadedFile = uploadedFile; } public void submit() { // Get information you from the uploaded file System.out.println("Uploaded file name : " + uploadedFile.getFileName()); }}
在写这篇文章时,还有个问题没有解决,就是上传文件的名称为中文时,保存的文件名为乱码,期待完善中.