Without seeing your filter code and web.xml it's hard to be sure, but my
guess would be that you need to modify the order you apply your filters
in. Remember that, with a file upload, form parameters are transmitted
in the request body rather than as a query string. It sounds like
req.getParameter() is being intercepted by one of the filters in the
chain that precedes yours or something. Post your code, web.xml and full
stack trace if you still need help isolating the problem.
L.
Paul Saumets wrote:
As a side note,
My filter has a couple req.getParameter calls (which I think in-turn calls an
InputStream somehow?) in it's doFilter method which seems to be causing the
state exceptions later after a form is submitted.
Is there a way to avoid this or a way to ensure filters arn't processed when a
form is submitted?
Regards,
Paul
_____
From: Paul Saumets [mailto:[EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Tue, 06 Mar 2007 14:44:32 -0500
Subject: [s1] Filters / State Exceptions
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]