关于webwork上传文件,文件名变小写的解决方案

 webwork.properties文件里设置webwork.multipart.parser=jakarta(即使用commons-fileupload工具类上传文件),接着在工程lib里加入commons-fileupload-1.2.jar包,我原先用的是commons-fileupload.jar版本,用了1.2版本后,文件名就不会变小写了。

ps: webwork.properties代码

  1. # make webwork use our configuration object, which looks at webapps
  2. # setup properties - and then delegates to this file for properties not found there.
  3. #webwork.configuration=com.ngshouse.setup.webwork.NGSPropertyWebWorkConfigLoader
  4. tag.altSyntax=true
  5. i18n.reload = true
  6. webwork.action.extension=action
  7. ### Used by FilterDispatcher
  8. ### If true than WW serves static content from inside its jar.
  9. ### If false than the static content must be available at <context_path>/webwork
  10. webwork.serve.static=true
  11. ### Load custom default resource bundles
  12. webwork.custom.i18n.resources=i18n
  13. webwork.i18n.encoding=utf-8
  14. webwork.ui.theme=simple
  15. # uses javax.servlet.context.tempdir by default
  16. webworkwebwork.multipart.saveDir=
  17. webwork.multipart.maxSize=2097152
  18. #file upload temp save 
  19. webwork.multipart.saveDir=d/:/temp
  20. #file upload class 
  21. webwork.multipart.parser=jakarta

附:commons-fileupload-1.2.jar下载地址:

http://download.csdn.net/source/735622

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值