Jason King
Jason King

Reputation: 11

GWT UploadServlet maxSize not being respected

I've seen this question asked a couple of times a long while back but haven't seen a solid answer so I was hoping to get a bit more information.

I am working with the GWT UploadServlet and running into the issue where the 512 KB file limit is reached. I've tried adding the context params for maxSize and maxFileSize into my web.xml to no avail.

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

<context-param>
    <!-- max size of the upload request -->
    <param-name>maxFileSize</param-name>
    <param-value>10240000</param-value>
</context-param>

The UploadServlet still initializes on startup with the 512 KB limit it defaults to. Does anyone have any idea how to get this working correctly?

Upvotes: 1

Views: 109

Answers (1)

Luigi Polvani
Luigi Polvani

Reputation: 405

Don't.

Seems like you are using gwt-upload, which looks like an old and unmaintained piece of software.

I would strongly suggest to take advantage of the Servlet 3.0/3.1 specs and simply post the file from the client and let the server do the dirty work.

Here there is a full explanation with examples: https://stackoverflow.com/a/2424824/2858092

Upvotes: 2

Related Questions