My snippet does 2 things.

1) Merges the servlet names and mappings into web.xml
2) creates a file containing all the mappings done in 1

The 2 are independent from one another. But I like to see the snippet created by the JSPC task by iteslef occasionally for when bad things happen.

The jasper2 task edits web.xml in place. That being said, make sure your build process creates a build directory. Copies all we resources to the build directory (including web.xml), then compile and classes to WEB-INF/classes (or compile and jar them), then run the jasper2 task to in place edit web.xml. The advantage is make clean becomes a dir removal and a rebuild is *very* easy.

-Tim

Andreas Schildbach wrote:
Tim Funk wrote:

I haven't read the docs for this so I am very surprised it wasn't there. The source for JSPC is very easy to read. Anything that is a set method can be called via ant. With luck - I might find some time to update the docs for this one.


Actually the semantics is more unclear than the syntax to me. What exactly does addWebXmlMappings="true" mean? Add to the file specified in webXmlFragment? But in your example the file "generated_web.xml" isn't present at first, so there can't anything be added?

Regards,

Andreas

<jasper2 compile="true"
validateXml="false"
uriroot="${basedir}/${build.dir}"
poolingEnabled="false"
webXmlFragment="${basedir}/${build.dir}/WEB-INF/generated_web.xml"
addWebXmlMappings="true"
outputDir="${basedir}/${jspc.base}"/>



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to