You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Hess <gh...@wrappedapps.com> on 2002/03/21 16:36:07 UTC

Unexpected behavior with FormFile IO

Hi All,

The FormFile object does not throw an exception when calling
getInputStream() to a file that does not exist. If my client supplies an
invalid file path without using the Browse button for a file input the
FormFile returns a InputStream to read from with 0 bytes available. It seems
the only way I can catch this error is by checking the number of bytes
available in the  input stream before I use it. This seems to be unexpected
behavior with an IO operation?

Greg


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>