小编Chr*_*net的帖子

Upload File issue with spring 3 - MultipartException , connection reset

I got a form belonging to a web app that contains a "file" field to upload a pdf file.( spring 3 environment, multipart file upload) Uploading file works fine in test environnement (all browsers), and only works with Firefox in production environment (file upload cause connection reset exception with low internet connection client browser especially)

The following exception is thrown a few seconds after submit button is pressed : ( browser is IE/Chrome running in windows environment but not Firefox) …

spring file-upload multipart

5
推荐指数
1
解决办法
7578
查看次数

作为war的Maven包:不考虑带有*.vm文件的src/main/java下的文件夹(速度模板)

我使用Maven打包为Java EE项目.

我使用tomcat-maven-plugin,我只是简单地"mvn clean tomcat deploy".

除了未打包到War文件中的文件夹外,一切正常.

这个文件夹是src/main/java下的源文件夹,只有*.vm文件(不是.java文件),这是我的Velocity模板.

有没有办法告诉maven打包这个文件夹!(我怀疑只考虑包含.java文件的包)

在控制台我得到:

[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ accueil_individu ---
[INFO] Packaging webapp
[INFO] Assembling webapp [accueil_individu] in             [D:\DevSpring\workspace\accueil_individu\target\accueil_individu]
[INFO] Processing war project
[INFO] Copying webapp resources        [D:\DevSpring\workspace\accueil_individu\src\main\webapp]
[INFO] Processing overlay [ id org.springframework.security:spring-security-samples-cas-client]
[INFO] Webapp assembled in [1699 msecs]
[INFO] Building war:   D:\DevSpring\workspace\accueil_individu\target\accueil_individu.war
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored 
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as    'true')
[INFO] 
[INFO] <<< …
Run Code Online (Sandbox Code Playgroud)

maven-2 maven

1
推荐指数
1
解决办法
2511
查看次数

标签 统计

file-upload ×1

maven ×1

maven-2 ×1

multipart ×1

spring ×1