在tomcat7管理器中 当我部署war文件时,会出现此消息...
/manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=11DD9FAE4DEB7F9DB7DC4FD9A308BEB7
我无法找到为什么会显示此消息.. pz帮助我
我的pom.xml(我添加了google api,但其他依赖项也出现了相同的错误)
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-vision</artifactId>
<version>v1-rev24-1.22.0</version>
</dependency>
<build>
<defaultGoal>install</defaultGoal>
<directory>${basedir}/build</directory>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<outputDirectory>${basedir}/build/classes</outputDirectory>
<testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
<testOutputDirectory>${basedir}/build/test-classes</testOutputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
<resource>
<directory>src/main/resources-${environment}</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8080</port>
<path>/</path>
<systemProperties>
<JAVA_OPTS>-Dfile.encoding=UTF-8 -Xms2048M -Xmx2048M -XX:PermSize=128M -XX:MaxPermSize=128M</JAVA_OPTS>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>webapp</warSourceDirectory>
<webXml>webapp/WEB-INF/web.xml</webXml>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
答案 0 :(得分:6)
我自己解决了这个问题。
问题的原因是tomcat7部署文件限制。
解 转到管理器应用程序的web.xml(例如,它可以在/tomcat7/webapps/manager/WEB-INF/web.xml下。 增加max-file-size和max-request-size:
<multipart-config>
<!– 50MB max –>
<max-file-size>92428800</max-file-size>
<max-request-size>92428800</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>