Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

forwarding a servletResponseWrapper  RSS feed

 
todd hughes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having trouble forwarding a wrapped servlet response. When the HttpServletResponseWrapper object encounters a dispatcher.forward it throws an illegalStateException. If I change the dispatcher.forward to a dispatcher.include, the wrapper works.
Is there a way to make the wrapper follow forwards, as well as includes?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the API it looks like you get that exception if your servlet has already an output stream or writer. Is that possible in your situation? Do you output anything before calling forward?
Bill
 
todd hughes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing is posted prior to the forward.
 
todd hughes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing is posted prior to the forward.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!