关于struts2上传文件报错“No result defined for action and result input”
2013-12-29 22:51
489 查看
以往开发过程中碰到struts2上传文件报错“No result defined for action and result input”的几种原因:
1、表单中字段的类型与Action中定义的类型不匹配,需仔细检查。
2、struts.properties中struts.multipart.saveDir属性指定的目录没有被赋予当前用户的操作权限。
注意:
1、上传文件的form需加上属性enctype="multipart/form-data"。
2、struts.multipart.saveDir是struts2上传文件的临时目录,不配置时会默认为:${tomcat_home}\work\Catalina\localhost\项目名。
1、表单中字段的类型与Action中定义的类型不匹配,需仔细检查。
2、struts.properties中struts.multipart.saveDir属性指定的目录没有被赋予当前用户的操作权限。
注意:
1、上传文件的form需加上属性enctype="multipart/form-data"。
2、struts.multipart.saveDir是struts2上传文件的临时目录,不配置时会默认为:${tomcat_home}\work\Catalina\localhost\项目名。
相关文章推荐
- 关于struts2上传文件报错“No result defined for action and result input”
- struts2 上传文件 HTTP Status 404 - No result defined for action.....and result input
- No result defined for action action and result input 解决办法——struts2 文件上传
- [SSH]No result defined for action and result input 和 Struts2中关于值跳转input,而不执行action的问题
- 前端form表单上传文件报No result defined for action xxx and result input
- 【填大坑】关于Struts2中的 No result defined for action and result input 错误
- struts2的上传文件大小限制引起HTTP Status 404 - No result defined for action com.cpms.action.organ.UploadFile and result inpu
- struts2 多文件上传 No result defined for action com.cpms.action.organ.UploadFile and result inpu
- Struts2-No result defined for action and result input
- struts2的那些事儿--No result defined for action.....and result input
- 关于"No result defined for action com.ccxe.credit.action.ReportAction and result input"的错误
- Struts2疑难--No result defined for action com.marry.action.HqsyAction and result input
- [SSH]Struts2 -- No result defined for action and result input
- struts2:No result defined for action com.jcyj.action.fitting.FittingsAction and result input
- struts2的那些事儿--No result defined for action.....and result input
- struts2 拦截器报错:No result defined for action xxx.action and result input
- HTTP Status 404 - No result defined for action EmployeeAction and result input - struts2类似异常解决及原因剖析
- struts2 在拦截器里报错:No result defined for action com.gkwl.action.UserAction and result input
- 关于Struts2报"No result defined for action +(包名) and result input"的解决方法
- 关于No result defined for action com.gen.action.FrontAction and result input解决方法