jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: [servlet-spec users] Re: Candidate for Servlet 3.1 Early draft review

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Wed, 07 Mar 2012 16:05:55 -0800

On 3/6/12 5:47 AM, Mark Thomas wrote:
> On 05/03/2012 22:22, Shing Wai Chan wrote:
>> On 2/29/12 1:41 AM, Minoru Nitta wrote:
>>> Hi,
>>>
>>> Some trivial feedback.
>>>
>>> Return value type of javax.servlet.ServletRequest#getContentLength
>>> should be long not int, because Servlet has handled big data recently.
>>>
>>> Changing return value type could cause problems so we should consider
>>> (1)changing return value type or (2) adding a new method (e.g.
>>> getContentLengthLong) whose return type is long.
>> (1) will break backward compatibility.
> Tomcat already has something very like 2. IT was added to improve the
> handling of very large files. I'm +1 on adding such a method.
>
> Mark
In this case, we will add the following new methods to the following
interfaces:
javax.servlet.ServletRequest:
     public long getContentLengthLong();

javax.servlet.ServletResponse:
     public void setContentLengthLong(long len);

Please let me know if there is any further comments.
Shing Wai Chan