Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[s1] Filters / State Exceptions

Paul Saumets | Merge

2007-03-06


Hey,

I'm hoping someone here could give me some insight why I'm getting an IllegalStateException with my filter.


java.lang.IllegalStateException: getInputStream() has already been called for this request

My filter calls InputStream in it's init method because it requires to read information from a config file.

the doFilter method has absolutely no stream calls. The filter works fine until I submit a form. If I go to a page that has a form
and submit I then receive the above state exception?

Would anyone have any insight why this might be?

I'm going to get around this by dropping my config file and just using filter init-params in my web.xml file instead but I would
REALLY like to know why this was occuring just for some understanding.

Regards,
Paul
©2008 junlu.com - Jax Systems, LLC, U.S.A.