form 的 encoding設置不當導致在jsp中使用request.getParametre(paraName)無法獲取表單提交的值
如果表單的encoding爲multipart/form-data,則提交表單後在jsp中request.getParametre(paraName)無法得到該參數的值,在上傳的時候則需要設置encoding爲multipart/form-data,默認的爲application/x-www-form-urlencoded。
在頁面上form對應的屬性爲enctype="application/x-www-form-urlencoded", 而通過js來動態改變的話則爲formObj.encoding="xxx"