webwork.properties文件里设置webwork.multipart.parser=jakarta(即使用commons-fileupload工具类上传文件),接着在工程lib里加入commons-fileupload-1.2.jar包,我原先用的是commons-fileupload.jar版本,用了1.2版本后,文件名就不会变小写了。
ps: webwork.properties代码
- # make webwork use our configuration object, which looks at webapps
- # setup properties - and then delegates to this file for properties not found there.
- #webwork.configuration=com.ngshouse.setup.webwork.NGSPropertyWebWorkConfigLoader
- tag.altSyntax=true
- i18n.reload = true
- webwork.action.extension=action
- ### Used by FilterDispatcher
- ### If true than WW serves static content from inside its jar.
- ### If false than the static content must be available at <context_path>/webwork
- webwork.serve.static=true
- ### Load custom default resource bundles
- webwork.custom.i18n.resources=i18n
- webwork.i18n.encoding=utf-8
- webwork.ui.theme=simple
- # uses javax.servlet.context.tempdir by default
- # webworkwebwork.multipart.saveDir=
- webwork.multipart.maxSize=2097152
- #file upload temp save
- webwork.multipart.saveDir=d/:/temp
- #file upload class
- webwork.multipart.parser=jakarta
附:commons-fileupload-1.2.jar下载地址: