Cannot assign value of type 'java.lang.String' to property 'file' of type 'org.apache.struts.upload.FormFile'
来源:互联网 发布:淘宝上两个号会黑吗? 编辑:程序博客网 时间:2024/05/22 00:17
Exception:
org.apache.commons.beanutils.ConversionException: Cannot assign value of type 'java.lang.String' to property 'file' of type 'org.apache.struts.upload.FormFile'
at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:423)
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1769)
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1481)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>
SOLUTION:
add "enctype='multipart/form-data'" to your action form.,
- Cannot assign value of type 'java.lang.String' to property 'file' of type 'org.apache.struts.upload.FormFile'
- had objects of type "java.lang.String" but expected signature "org.apache.struts.upload.FormFile"
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONArra
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSON
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSON
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value ok of type java.lang.String cannot be converted to JSONObject:
- org.json.JSONException: Value ok of type java.lang.String cannot be converted to JSONObject: [Caugh
- Failed to convert property value of type [java.lang.String] to required type [boolean] for property
- Failed to convert property value of type 'java.lang.String' to required type 'int' for property
- apache和tomcat区别
- 80后的世界33总结
- /usr/local/lib/libneon.a :undefined reference
- spring 整合hibernate
- xpphone电话操作视频:成功实现电脑与手机的完美转换
- Cannot assign value of type 'java.lang.String' to property 'file' of type 'org.apache.struts.upload.FormFile'
- ORACLE 对大小写敏感
- Java操作Excel
- 主动生活
- Windows核心编程 (1)
- 遇到的问题
- CFReadStreamCopyProperty() returns NULL?
- Change the default Phone ringtone and notification ringtone
- Windows核心编程 (2)