<p>We have the usual <strong>web.xml</strong> for our web application which includes some jsp and jsp tag files.  I want to switch to using pre-compiled jsp's.  I have the pre-compilation happening in the build ok, and it generates the web.xml fragment and now I want to merge the fragment into the main web.xml.</p>

<p>Is there an <strong>include</strong> type directive for <strong>web.xml</strong> that will let me include the fragment.  </p>

<p>Ideally I will leave things as is for DEV- as its useful to change jsp's on the fly and see the changes immediately but then for UAT/PROD, the jsp's will be pre-compiled and thus work faster.</p>

Doh - there is an option on the jasper2 task to auto-merge the fragment into the main web.xml -
addWebXmlMappings
```
```
<jasper2
         validateXml="false"
         uriroot="${web.dir}"
         addWebXmlMappings="true"
         webXmlFragment="${web.dir}/WEB-INF/classes/jasper_generated_web.xml"
         outputDir="${web.dir}/WEB-INF/jsp-src" />
```
```
I wonder how good the merge is...
Annoyingly you need to generate the fragment still, even though its not needed after this task.