Remy Maucherat wrote:
Hi,
It is not very convinient or easy to insert the declarations for compiled JSPs into the webapp's web.xml file. It also has the disadvantage of adding a lot of mess in the web.xml, which the user may not like.
For that reason, I propose that Tomcat parses a new (optional) XML file, with the same DTD as web.xml, which would contain declarations identical to web.xml, and which would be used for declaring the compiled JSPs. I propose naming that file compiledjsp.xml.
An additional advantage is that it would allow Tomcat to precompile webapps as they are deployed (otherwise, nasty XML manipulation is needed to do that, and I think overwriting the originial web.xml during deployment is bad).
Maybe someone has a better solution for this problem. Any comments ?
I don't think it is a good idea. That won't be standard, and I don't think this is a good reason to "extend" it.
The precompilation should be part of the deployment or pre-deployment step - the developer shouldn't see the modified web.xml.
I agree that using ant replace is a hack - the right solution would be to read the XML with DOM, insert the elements in the right place, and save back
( DOM - so we don't loose comments ). Or even read it as a file, and use regexp. No problem if we save the original web.xml in the process.
I see modifying the original web.xml as a problem.
If you don't want the explicit extra XML file, I would instead create a new extra deployment descriptor in the work directory during the deploy procedure. That way, the feature is hidden, but you can't deploy the compiled webapp to another server without modifying the deployment descritptor yourself.
An additional note: I think the order of elements is irrelevant with the new spec, so that simplifies things.
Remy
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]