# <jsp:include ... flush="false" >

## Classes Modified

### IncludeGenerator

- flush is not a required parameter anymore. Default value is "false".
- generated code now flushes the buffer or not prior to calling pagecontext.include() depending on the flush value

### PageContextImpl

- set the value of isIncluded when the page context is initialized include()
- flush in an include is not done in pageContext anymore. This is handled prior to calling the include() so we can flush or not depending on the value of the flush attribute.
- A ServletResponseWrapperInclude object is now passed as the Response (the including page JspWriter is what gets returned in getWriter()) release()
- if isIncluded()
  - flush the current jspWriter into the including page JspWriter
- else
  - flush through (recursive) the buffer

### JspParseEventListener

- generateFooter(): do not generate the code to flush the buffer anymore this will be handled in pageContext.release() which will flush the buffer in a way that depends whether the page is being included or not.

### messages.properties

- add jsp.error.include.flush.invalid.value

## New files

### ServletResponseWrapperInclude

## Issues

Implementation of this new feature has brought up a few issues which have been submitted to the expert group. Implementation will be revised once we get clarifications.

Specifically:

- A forward done in an included page yields an infinite loop because the jsp engine has no way of knowing that the include request attributes should be ignored.
- Not clear what the impact of a forward performed within an included page should be on the output buffers.