This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Filter  RSS feed

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writting a filter to always redirect to a particular page but any time i access it i always get this error************************************************************************


java.lang.IllegalStateException: Cannot create a session after the response has been committed

************************************************************************

And the code segment is found below
************************************************************************




[BPSouther: Added code tags]
[ August 29, 2007: Message edited by: Ben Souther ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use UBB code tags when posting code. Please read this for more information.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Abiodun Adisa:

hresponse.sendRedirect("/index.faces");
filterChain.doFilter(request, response);

Either do s redirect or continue the filter chain. It makes no sense to do both, and will usually cause problems (as you well know).
 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Please use UBB code tags when posting code. Please read this for more information.


Thanks for the UBB Tags Information, I never knew such features existed, would be sure to use them next time
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!