There's nothing built into Jersey for this?
I saw there were things built in for CXF...
________________________________
From: Glen Mazza <gmazza_at_talend.com>
To: users_at_jersey.java.net
Sent: Sunday, February 26, 2012 12:13 PM
Subject: [Jersey] Re: limit on byte[] or InputStream parameters
You might try to configure a filter (unrelated example would be [1]) at the servlet container level that would automatically throw some system exception if the size of the incoming message goes above a particular threshold. I.e., have your servlet container, and not Jersey itself, enforce this.
Glen
[1]
https://github.com/gmazza/jersey-samples-on-cxf/blob/master/https-clientserver-grizzly/src/main/java/com/sun/jersey/samples/https_grizzly/auth/SecurityFilter.java
On 02/26/2012 08:15 AM, Ronak Patel wrote:
Hi all,
>
>
>I know that Jersey can handle byte[] and InputStream parameters and it's been working great.
>
>
>However, I was wondering how Jersey would let me place a limit on the size of said byte[] or InputStream.
>
>
>It's a serious security risk when a client can upload a 4 GB file and crash the JVM!!
>
>
>Thanks!
>
>
>Ronak Patel
--
Glen Mazza
Talend Community Coders - coders.talend.com blog: www.jroller.com/gmazza