While forwarding from one page to another by using RequestDispatcher, how do I avoid the error " OutputStream is already being used for this request" ?

thomas dietrich

Just a few pointers:

1) First, when the servlet it called it should be the final action for that JSP. (I.E. the action of a form).

2) Second, redirection should be the final action of that servlet, like don't call the redirection, and then have the servlet try write to the response.

3) Third, and I'm not sure about this, I believe that you can't be already writing to the response page, before you call the redirection.

Check these out, these were some of my probs trying to work with redirection in the past, and might be a little fuzzy too.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact