gpt4 book ai didi

java - Eclipse - gwtupload - maxSize

转载 作者:太空宇宙 更新时间:2023-11-04 06:49:20 26 4
gpt4 key购买 nike

我尝试使用 gwtupload 将上传文件的大小限制为大约 30 KB。所以我在web.xml中将参数maxSize的值设置为30360。但是,控制台记录器仍然显示:

0    [qtp349420578-27] INFO  gwtupload.server.UploadServlet  - UPLOAD-SERVLET init: maxSize=3145728, slowUploads=0, isAppEngine=false, corsRegex=^$

关于如何覆盖这个的任何想法?

问候,

格林

这是整个 web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<context-param>
<!-- max size of the upload request -->
<param-name>maxSize</param-name>
<param-value>30360</param-value>
<!-- param-value>3145728</param-value -->

</context-param>

<context-param>
<!-- Useful in development mode to slow down the uploads in fast networks.
Put the number of milliseconds to sleep in each block received in the server.
false or 0, means don't use slow uploads -->
<param-name>slowUploads</param-name>
<param-value>0</param-value>
</context-param>

<servlet>
<servlet-name>mySQLConnection</servlet-name>
<servlet-class>org.AwardTracker.server.MySQLConnection</servlet-class>
</servlet>

<!-- servlet>
<servlet-name>uploadServlet</servlet-name>
<!- This is the default servlet, it puts files in session -
<servlet-class>gwtupload.server.UploadServlet</servlet-class>
</servlet -->

<servlet>
<servlet-name>uploadServlet</servlet-name>
<servlet-class>org.AwardTracker.server.MyCustomisedUploadServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>mySQLConnection</servlet-name>
<url-pattern>/org.AwardTracker.AwardTracker/MySQLConnection</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>uploadServlet</servlet-name>
<url-pattern>*.gupld</url-pattern>
</servlet-mapping>

<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>AwardTracker.html</welcome-file>
</welcome-file-list>

</web-app>

最佳答案

我重新编译了,现在可以了。我已经做了“干净”了。我不知道为什么我需要重新编译 web.xml 更改。

虽然错误信息不太友好。有没有办法个性化错误消息?

问候,

格林

关于java - Eclipse - gwtupload - maxSize,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23556302/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com