tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Coy <steve...@optushome.com.au>
Subject Re: IllegalStateException: Short Read while trying to do forward()
Date Wed, 20 Dec 2000 09:42:32 GMT
G'Day,

on 20/12/00 4:08 AM, Jason C Jones at jcjones@iastate.edu wrote:

> I am running 3.2.1 in standalone mode and when I try to do a forward with a
> RequestDispatcher I get the following error:
> 
> going to /patient.jsp
> res.isCommitted() = false
> res.getBufferSize() = 8192
> 2000-12-19 04:53:48 - Ctx( /nativeweb ): Exception in: R( /nativeweb +
> /patient.
> jsp + null) - java.lang.IllegalArgumentException: Short Read
> at javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238)
> at org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101)
> 
> 
> Note the two debugging lines above the exception.  According to the specs, an
> IllegalArgumentException is thrown when the response is already committed,
> which it is not as you can see.
> 
> Is this a bug?  The servlet in question uses HttpUtil.parsePostData to read
> the 
> post data and inflate a bean.  It then puts the bean into the session object
> and tries to redirect to a jsp for display.
> 
> Anyone have any ideas?
> 

I'm going to take a stab at the obvious here (at least to me). You seem to
be confusing the IllegalArgumentException with IllegalStateException. I
don't think that your assertion that "According to the specs, an
IllegalArgumentException is thrown when the response is already committed"
is quite right. I'm pretty sure that it says "Illegal *State* Exception".

I suspect that you are passing a bad argument to your bean inflation code,
and this is causing the "Illegal *Argument* Exception".

Regards,

Steve Coy



Mime
View raw message