j2ee学习 记坑贴

来源:互联网 发布:马尔科夫概率转移矩阵 编辑:程序博客网 时间:2024/06/02 01:28

坑1

标签中

<input disabled = "disabled">的话,其值无法上传。

用hibernate更新,id设置为disabled,结果更新报错如下

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested

找了半天才发现是id值没有传进去...


坑2

使用ssh,<input type="file" name="upload_file"/>

其他都好说,文件上传也行,但是在Action中无法得到文件名,类型后缀啥的也没有

Action中需要有

File upload_file;

String upload_fileFileName;

String upload_fileContentType;

标红的为必须要的后缀,一开始没注意结果一直用upload_fileName,文件名无论如何也没有,也不报错...


0 0
原创粉丝点击