This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes forwarding a servletResponseWrapper Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "forwarding a servletResponseWrapper" Watch "forwarding a servletResponseWrapper" New topic
Author

forwarding a servletResponseWrapper

todd hughes
Greenhorn

Joined: Apr 16, 2003
Posts: 3
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

Joined: Mar 22, 2000
Posts: 12268
    
    1
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

Joined: Apr 16, 2003
Posts: 3
Nothing is posted prior to the forward.
todd hughes
Greenhorn

Joined: Apr 16, 2003
Posts: 3
Nothing is posted prior to the forward.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: forwarding a servletResponseWrapper
 
Similar Threads
Connection with servlets (jsp)
non-HTTP request or response Exception
Sometimes RequestDispatcher is not forwarding URL
Inter Servlet Communication
JSP called from filter not finding JavaScript file