-
1. Re: getOutputStream() has alredy been called exception
svadu Mar 26, 2007 4:08 PM (in response to radhesh)From what I know the #1 condition for ajax4jsf to work properly is to have the ajax4jsf filter to be first in your web.xml
-
2. Re: getOutputStream() has alredy been called exception
radhesh Mar 26, 2007 4:11 PM (in response to radhesh)oh..sorry, I did not mention that...I have ajax4jsf as the first entry in my web.xml...!
-
3. Re: getOutputStream() has alredy been called exception
radhesh Mar 26, 2007 4:15 PM (in response to radhesh)may be I can add one more pointer here..inspite of this exception in console, I am in fact getting the response page displayed in browser. However, the page does not seem to have the ajax4jsf javascripts being downloaded..so, now of the ajax actions work...:-(
-
4. Re: getOutputStream() has alredy been called exception
svadu Mar 26, 2007 4:16 PM (in response to radhesh)I have ajax4jsf as the first entry in my web.xml
AFAIK if the ajax4jsf is first no other filter can forward the request because ajax4jsf gets the request first...
So this:Can this be the cause of this exception that the Ajax4jsf filter is not able to write to the response stream after the request has already been forwarded?
is unlikely, imho -
5. Re: getOutputStream() has alredy been called exception
sergeysmirnov Mar 26, 2007 4:21 PM (in response to radhesh)Ajax4jsf filter checks for Servlet specification violations ( only one of output Writer or Stream can be used at the same time)
So, something in your application (or in other libraries) tries to ignore this restriction. -
6. Re: getOutputStream() has alredy been called exception
radhesh Mar 26, 2007 4:21 PM (in response to radhesh)u r right...but, the funny part is when I remove the a4j tags from the JSP page, I no longer get this exception and everything works fine...
-
7. Re: getOutputStream() has alredy been called exception
sergeysmirnov Mar 26, 2007 4:26 PM (in response to radhesh)"SergeySmirnov" wrote:
Ajax4jsf filter checks for Servlet specification violations
How do you think, what Ajax4jsf does if the violation is detected ? :-/ -
8. Re: getOutputStream() has alredy been called exception
radhesh Mar 26, 2007 4:28 PM (in response to radhesh)"SergeySmirnov" wrote:
Ajax4jsf filter checks for Servlet specification violations ( only one of output Writer or Stream can be used at the same time)
So, something in your application (or in other libraries) tries to ignore this restriction.
..thanks Sergey...I was also thinking in the same lines..but could not figure out the mistake at the first inspection...I guess I will have to go back and do somre more poking around to find the real culprit ... -
9. Re: getOutputStream() has alredy been called exception
radhesh Apr 1, 2007 3:54 PM (in response to radhesh)i am still stuck with this problem...So, let me explain the scenario again..I have configured Ajax4jsf filter as the first filter in my web app. Now, I have my own filter which needs to change the request URL and perform a forward (using requestdispatcher.forward). So, the filter chain breaks here and the response no longer goes through the Ajax4jsf filter.
Can someone please suggest a solution to this deadlock issue? I don't have any other option than to use forward from my own filter..and at the same time I need to be able to use Ajax4jsf as well... -
10. Re: getOutputStream() has alredy been called exception
radhesh Jun 7, 2007 9:33 AM (in response to radhesh)Found the solution..in case someone is interested
If you use *.jsp as the mapping for Ajax4jsf filter, things work just fine.