Loading...

java .net

java.lang.IllegalStateException STREAMED

request.getInputStream() 和 request.getReader()不能同时调用,否则会引发java.lang.IllegalStateException异常。

API中有写:

getInputStream

public ServletInputStream getInputStream()
throws java.io.IOException
Retrieves the body of the request as binary data using a ServletInputStream. Either this method or getReader() may be called to read the body, not both.
Returns:
a ServletInputStream object containing the body of the request
Throws:
java.lang.IllegalStateException - if the getReader() method has already been called for this request
java.io.IOException - if an input or output exception occurred

posted on 2009-10-19 13:48 阅读(3007) 评论(0)  编辑  收藏 所属分类: 学习java


只有注册用户登录后才能发表评论。


网站导航:
 

公告

希望有一天

我能用鼠标双击我的钱包

然后选中一张100元

按住“ctrl+c”

接着不停的“ctrl+v”

嘻嘻~~~笑醒~~~



导航

<2009年10月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

统计

常用链接

留言簿(6)

随笔分类(102)

随笔档案(398)

文章分类

文章档案(10)

有趣网络

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜