jsr369-experts@servlet-spec.java.net

[jsr369-experts] Adding support for obtaining post parameters asynchronously

From: Martin Mulholland <mmulholl_at_us.ibm.com>
Date: Tue, 1 Dec 2015 18:12:19 -0500

With the introduction of async i/o in Servlet 3.1 it is now possible for
applications to read post data asynchronously. However applications which
process parameters sent as post data can only take advantage of async i/o
if they are willing to parse the parameters themselves without use of the
convenience methods provided by ServletRequest.

I propose this is addressed and we provide a method for applications to
receive parameters as post data using async i/o without having to do their
own parsing. There are many ways to do this. My suggestions are:

Option 1. Add a new parameterListener object with methods
onParameterAvailable, onAllParametersRead, and onError (same equivalent
methods as a readListener). It could be registered with the input stream
just like readListener.

Option 2: Add a new method ServletRequest.addParameters(byte[][]
parameterBytes) This can then be called by the application's readListener
once it has received all of the post data.

Thank you,
Martin Mulholland.
WebSphere Application Server Web Tier Architect
email: mmulholl_at_us.ibm.com

IBM RTP, PO BOX 12195, 503/C227,
3039 Cornwallis Rd, RTP, NC 27709-2195
 t/l 444-4319, external (919)-254-4319