On Fri, 21 Mar 2003, Remy Maucherat wrote:
> Date: Fri, 21 Mar 2003 12:05:26 +0100 > From: Remy Maucherat <[EMAIL PROTECTED]> > Reply-To: Tomcat Developers List <[EMAIL PROTECTED]> > To: Tomcat Developers List <[EMAIL PROTECTED]> > Subject: [5.0] [PROPOSAL] Extra web.xml to declare compiled JSPs > > 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 ? > Many app servers have private deployment descriptors for "extra" information, similar to what Remy is proposing -- indeed, one could claim that Tomcat does this already with how we use $CATALINA_HOME/conf/web.xml to set default behavior (well, at least until Costin's recent patch :-). However, I think it would be bad policy to implement Remy's suggestion for the incorporation of JSPC output framgments, for several reasons: * Applications that would depend on this behavior are no longer portable to other containers, whereas (as Costin points out) a webapp that includes jasper-runtime.jar will run on any compliant servlet container. * Most "extra info" deployment descriptors contain customized elements that are not in the standard deployment descriptor's DTD or schema -- that is not the case for the elements we are talking about here. * IMHO, the deployment descriptor should be viewed as an output of a development process, rather than an input -- just as you package .class files (created from .java files) for all your bean classes. It is straightforward to create an Ant build.xml file (or whatever) that assembles fragments provided by the application developer, plus fragments generated by JSPC, into the ultimate web.xml file packaged in the webapp. The developer should never even have to look at the merged version of this file (in the same way that developers using an IDE-type tool that auto-generates web.xml files avoids the need to look at it). > Remy Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
