- 浏览: 267449 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (251)
- 面试基础 (9)
- java基础 (40)
- 调试配置 (10)
- 转载文章 (4)
- 心灵鸡汤 (8)
- java工具 (6)
- CSS学习 (7)
- css案例 (2)
- 经济 (1)
- 小节惹的祸 (1)
- 实例心得 (21)
- 数据库 (7)
- 有用的代码 (17)
- Struts (3)
- Hibernate (5)
- Spring (3)
- java xml (7)
- Java Reflection API (1)
- 网络配置 (4)
- SSH (8)
- java开源框架 (13)
- ajax (4)
- swing (1)
- 设计模式 (1)
- 未主流组件 (7)
- WebService (6)
- 20111019 (1)
- xiao清讲课笔笔~~~UML (0)
- 笔记 (2)
- SOAP (9)
- 第一天遇到的问题 (1)
- Java Card (3)
- 面试 (18)
- Java (17)
- JNLP 集群 (0)
- java 面试 (3)
最新评论
-
ap0406708:
138XXXXXXXX
webserivce spring-ws 安全 -
yezhuzhe:
...
[code]SSH上传下载 ------温故知新 -
thinking_ou:
怎么需要解压密码
webserivce spring-ws 安全 -
ap0406708:
uuu999ggg 写道连return都写错了
try catch finally 块 与 函数的return -
wst0350:
...
java正则表达式,js正则表达式
遇到错误:
1.
fileupload取编辑框的值乱码。
String value = item.getString();
改为
String value = item.getString("UTF-8");
http://argen.bokee.com/viewdiary.14753538.html
2.
java.sql.SQLException: General error, message from server: "Incorrect string value: '\xD0\xD0\xD2\xB5\xB6\xAF...' for column 'parentclass' at row 1"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1977)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1272)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2236)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1588)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at org.mram.news.ClassDAO.update(ClassDAO.java:138)
原因是因为mysql在建表时是用intan1编码的(就算建表后改成utf-8)也不行~~~
要删表,再重新建表才行。
3.
[ERROR] 2009-09-10 20:27:45 org.apache.commons.beanutils.PropertyUtils - Method invocation failed.
java.lang.IllegalArgumentException: argument type mismatch
Do you have this setting in your form?
enctype="multipart/form-data"
无设form的编码
4.
[ERROR] 2009-09-11 21:13:35 org.springframework.web.struts.ContextLoaderPlugIn - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/fileinfos' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'fileinfosDaoManager' while setting bean property 'fileinfosDaoManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileinfosDaoManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'fileinfosDao' of bean class [com.ust.service.impl.FileinfosManagerImpl]: Bean property 'fileinfosDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileinfosDaoManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'fileinfosDao' of bean class [com.ust.service.impl.FileinfosManagerImpl]: Bean property 'fileinfosDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by:
org.springframework.beans.NotWritablePropertyException: Invalid property 'fileinfosDao' of bean class [com.ust.service.impl.FileinfosManagerImpl]: Bean property 'fileinfosDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
依赖注入无setter方法~~
5.
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null on action /goselect.do
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
action无配formbean
action要指定相关的form bean
6.
javax.servlet.ServletException: No getter method for property file1 of bean
<form>标签中的file1在frombean中无对应的file1属性
心得:
1
在struts中jsp的<from>要对应formbean的属性~~~~~
两者的名称很重要~~~~
如果不对应就会提示,很多这些那些的设置属性错误~~~~
file_0:false
file[0]:true
System.out.println("file[0]:"+elements.containsKey("file[0]"));
FileinfosForm f = (FileinfosForm) form;
file[0]:true
file.gif
1.
fileupload取编辑框的值乱码。
String value = item.getString();
改为
String value = item.getString("UTF-8");
http://argen.bokee.com/viewdiary.14753538.html
2.
java.sql.SQLException: General error, message from server: "Incorrect string value: '\xD0\xD0\xD2\xB5\xB6\xAF...' for column 'parentclass' at row 1"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1977)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1272)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2236)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1588)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at org.mram.news.ClassDAO.update(ClassDAO.java:138)
原因是因为mysql在建表时是用intan1编码的(就算建表后改成utf-8)也不行~~~
要删表,再重新建表才行。
3.
[ERROR] 2009-09-10 20:27:45 org.apache.commons.beanutils.PropertyUtils - Method invocation failed.
java.lang.IllegalArgumentException: argument type mismatch
Do you have this setting in your form?
enctype="multipart/form-data"
无设form的编码
4.
[ERROR] 2009-09-11 21:13:35 org.springframework.web.struts.ContextLoaderPlugIn - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/fileinfos' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'fileinfosDaoManager' while setting bean property 'fileinfosDaoManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileinfosDaoManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'fileinfosDao' of bean class [com.ust.service.impl.FileinfosManagerImpl]: Bean property 'fileinfosDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileinfosDaoManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'fileinfosDao' of bean class [com.ust.service.impl.FileinfosManagerImpl]: Bean property 'fileinfosDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by:
org.springframework.beans.NotWritablePropertyException: Invalid property 'fileinfosDao' of bean class [com.ust.service.impl.FileinfosManagerImpl]: Bean property 'fileinfosDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
依赖注入无setter方法~~
5.
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null on action /goselect.do
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
action无配formbean
action要指定相关的form bean
6.
javax.servlet.ServletException: No getter method for property file1 of bean
<form>标签中的file1在frombean中无对应的file1属性
心得:
1
在struts中jsp的<from>要对应formbean的属性~~~~~
两者的名称很重要~~~~
如果不对应就会提示,很多这些那些的设置属性错误~~~~
file_0:false
file[0]:true
System.out.println("file[0]:"+elements.containsKey("file[0]"));
FileinfosForm f = (FileinfosForm) form;
file[0]:true
file.gif
- fileuploadTest1_6XXXXX.rar (1.3 MB)
- 下载次数: 24
- uploadStrutsTest_6XXXXX.rar (2.1 MB)
- 下载次数: 28
发表评论
-
Android 笔记
2010-12-18 14:15 8601. 下载回来的project,如果系 [2010-12-18 ... -
VBA语句集100句 (Word VBA)
2010-08-25 15:06 1170- - - - - - - - - - - - - - - - ... -
webserivce spring-ws 安全
2010-07-28 14:24 1322gsoap http://www.cppblog.com/y ... -
POI 3.7 hwpf word转xhtml [更新]20101028
2010-07-28 13:55 1538如题~~~ Visual Studio Tools for ... -
[转] Javascript 操作select控件大全(新增、修改、删除、选中、清空、判断存在等)
2010-06-09 16:30 6261判断select选项中 是否存在Value="pa ... -
删除一个分类(作为外键),有这分类的产品要设相对字段为null
2010-05-20 09:05 750public ModelAndView del(Htt ... -
页面中文传参
2010-04-01 16:38 6281。后台处理端 String cname = reques ... -
域名空间
2010-02-07 11:01 572http://www.williamlong.info/arc ... -
[code] ssh 分页,自定义标签,查找,泛化dao,中文参数的传递
2009-11-30 23:58 1303步骤分三步: 1. 继承自SimpleTagSupport,注 ... -
[code]ssh分页 mysql 的 用hibernate的支持
2009-09-13 01:52 9991.用到hibernate的session的话,用完时一定要记 ... -
[code]jsp+servlet分页 mysql 的
2009-09-12 23:14 11311.分页可以在用sql语言查询时就指定查出几条记录 本程序是这 ... -
[code]根据xml配置文件得到数据库连接Connection
2009-08-23 21:03 881Java SAX解析器解析XML配置文件 http://ww ... -
[code]自己写的读xml配置文件获取变量(类似spring)
2009-08-23 20:27 1339配置文件: [size=x-large] <?xml ... -
JAVA数据类型间的相互转换 20090812(jsp+servlet+access)Topjoy
2009-08-14 00:38 1198http://sea-zhang.iteye.com/blog ... -
java删除文件(单个文件,文件夹,子文件夹) 20090812(jsp+servlet+access)Topjoy
2009-08-14 00:02 2061http://hi.baidu.com/%D2%B9%CE%B ... -
java中如何判断String中的内容是否为数字?
2009-08-13 23:41 2919可以用异常来做校验 /** * 判断字符串是否是整数 ...
相关推荐
使用mvc模式设计,jsp+servlet开发,同时可以上传两个文件,也可以自己修改下代码上传多个文件,在Servlet中使用开源fileupload包实现文件上传功能
jsp+servlet实现文件上传和下载,需要使用commons-fileupload,commons-io.jar java库文件
该案例通过FileUpload控件完成普通表单域和文件上传(单文件、多文件均可)混合操作,既能获取普通字段值,也上传成功。仅用于教学便于学生理解,代码难免有冗余,只提供为初学者参考,高手绕行!
小小购书网站实现购书网站的基本功能,采用JSP+Servlet技术,另外使用了BeanUtils,DBUtils,FileUpload等jar包。供初学者学习JSP和Servlet技术使用。使用了Mysql数据库
使用mvc模式设计,jsp+servlet+jdbc开发,包含数据库结构,jar包,数据库使用mysql,可以更改数据库,支持数据库记录上传文件的路径信息,...在Servlet中使用开源fileupload包实现文件上传下载功能Jsp+Servletfileupload
jsp+servlet 上传和下载包 commons-io-1.3.2.jar commons-fileupload-1.0.jar jsmartcom_zh_CN.jar
java+servlet+commons-io-2.4.jar+commons-fileupload-1.3.jar实现文件的上传与下载
本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。. 本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...
一、项目简述 功能: 前台: * 用户模块 * 分类模块 * 商品模块 ...环境配置: Jdk1.8 + Tomcat8.5 + mysql + ...项目技术: JSP + C3P0+ Servlert + html+ css + JavaScript + JQuery + Ajax + Fileupload等等。
fileupload jsp上传下载组件和使用方法
一、项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) ...Jdbc+ Servlert + html+ css + JavaScript + JQuery + Ajax + Fileupload等等
一、项目简述(+需求文档+PPT) 功能: 主页显示热销商品;所有商品展示,可进行商品搜索;点 击商品进入商品详情页...项目技术: JSP + C3P0+ Servlert + html+ css + JavaScript + JQuery + Ajax + Fileupload等等。
本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。. 本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...
本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。. 本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...
一、项目简述(+需求文档+PPT) 功能: 主页显示热销商品;所有商品展示,可进行商品搜索;点 击商品进入商品详情页...项目技术: JSP + C3P0+ Servlert + html+ css + JavaScript + JQuery + Ajax + Fileupload等等。
本文实例讲述了servlet+JSP+mysql实现文件上传的方法。分享给大家供大家参考,具体如下: 一、文件上传的基本操作: 1、 表单属性enctype的设置 multipart/form-data和application/x-www-form-urlencoded的区别 FORM...