控制台打印信息- Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir
- Could not find a Content-Type for uploadFile. Verify that a valid file was submitted.
- Could not find a Content-Type for uploadFile. Verify that a valid file was submitted.后面得到的文件是空
上传txt的可以,其他的就出错,这是怎么回事啊 并且错误页面没有错误信息
- Could not find a Content-Type for uploadFile. Verify that a valid file was submitted.
- Could not find a Content-Type for uploadFile. Verify that a valid file was submitted.后面得到的文件是空
上传txt的可以,其他的就出错,这是怎么回事啊 并且错误页面没有错误信息
enctype="multipart/form-data" name="upform" >
<table width="450px" height="100px" >
<tr>
<td>
<s:file id="filename" name="upload" label="上传文件"></s:file>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="button" name="Submit" value="提交"
onclick="LimitAttach(this.form, this.form.upload.value)">
</td>
</tr>
</table>
</s:form>
这个设置了还是有问题还有,我说了我传txt,jpg,doc,pdf都成功了,就是zip,rar,sql,或是其他类型的就失败
这和表单类型有关系吗?要是表单类型设置错误了,jpg的怎么传上去了呢?控制台错误信息2009-12-24 10:57:59 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: Could not find a Content-Type for uploadFile. Verify that a valid file was submitted.
2009-12-24 10:57:59 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: Could not find a Content-Type for uploadFile. Verify that a valid file was submitted.
<constant name="struts.multipart.saveDir" value="/tmp"/> 设置临时文件上传路径。
我也是遇到了同样的问题,纠结了好久找不到答案。无意间想着换个浏览器试试,结果IE和firefox都没问题。