• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Response Filter

 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a servlet response filter that uses a wrapper class (VOStringWrapper) that extends HttpServletResponseWrapper. The response gets wrapped, then passed to the servlet, then comes back to the filter (I know this is true do to some logging I have done). In the filter I check if something was put in the session. I get the following error:
java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()
Here is the pertinent part of my filter code:

This filter works correctly under Jetty, so I am not sure that WEbLogic does not like about it. ANy help would be greatly appreciated!
Thanks
Brian
 
Beware the other head of science - it bites! Nibble on this message:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic