Call to forward( ) always clears the buffer, thats why it is always said " never flush and forward". if response is already committed before calling to forward you get the
IllegalStateException Call to include( ) doesn't clears the buffer, as include is to get inclusion of response in caller response, so I think it doesn't make any sense if it clears the buffer. for example if we want to include some footer, then we can not clear the buffer.
After forward( ), anything written to response is ignored. But I think control comes back to caller method, But we can not write anything to response. Control flow is normal
java. Rules should not change for
Servlets and
JSP.
Yeah, Its seems correct, If forwarding request is producing any response then we get an exception. Remember : forward means complete handoff of responsibilities to another resource.
I don't understand the last point, What are you asking?