Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 86377 invoked from network); 5 Nov 2010 20:10:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Nov 2010 20:10:46 -0000 Received: (qmail 44453 invoked by uid 500); 5 Nov 2010 20:11:14 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 44419 invoked by uid 500); 5 Nov 2010 20:11:14 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 44410 invoked by uid 99); 5 Nov 2010 20:11:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 20:11:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 05 Nov 2010 20:11:11 +0000 Received: (qmail 86243 invoked from network); 5 Nov 2010 20:10:18 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by 127.0.0.1 with SMTP; 5 Nov 2010 20:10:18 -0000 Message-ID: <4CD464C7.70605@apache.org> Date: Fri, 05 Nov 2010 16:10:47 -0400 From: Tim Funk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: JSP Precompilation and Servlet 3.0 References: <4CD4111E.60109@christopherschultz.net> In-Reply-To: <4CD4111E.60109@christopherschultz.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org While I like the idea of using web-fragment.xml for precompiled jsp's - it would require the "meta-data complete" flag to be set to false which may as a side effect allow other artifacts to be loaded too. Hopefully jsp-precompile is part of the webapp build/deploy process so a developer can ignore it during development. But an admin (or release manager) can ensure that all jsps do compile before release is deployed. Setting up jsp-precompilation is a PITA the first time or 2 but once you get the hang of it, the precompilation step can be part of a standard snippet which can be pulled in via ant import. (For those of us who love ant) -Tim On 11/5/2010 10:13 AM, Christopher Schultz wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > All, > > Tim has just given his talk at ApacheCon NA about Servlet 3.0 / Tomcat > 7.0. It was really my first taste of the 3.0 spec and I had a thought > about the new features available for webapp configuration /other/ than > web.xml: > > - - web.xml fragments > - - class annotations > > The current method for JSP precompilation (which I've never used, mind > you, so forgive my ignorance if I'm incorrect) is cumbersome: > > - - run the compiler > - - copy the new .class files somewhere > - - drop a huge load of junk into web.xml > > It occurred to me that that these new servlet 3.0 features could help > JSP precompilation. Let's see what Tomcat 7.0's JSP precompiler could do > (roughly): > > $ jsp-precompile /path/to/jsps my-jsps.jar > $ cp my-jsps.jar /path/to/webapps/mywebapp/WEB-INF/lib > > (done) > > The precompiler could translate and compile all of the classes and > package them into a .jar file for you. Great. What about servlet > mappings? Well, we have two options: > > 1. Use annotations in the translated .java files > 2. Generate a web.xml fragment and stuff it into > my-jsps.jar/WEB-INF/web-fragment.xml > > Does anyone have any preferences? I suppose it could be an option to the > precompiler, or we could even do both (do duplicate mappings conflict?). > > Hopefully, this will make JSP precompilation less onerous for users. > > Thanks, > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkzUER4ACgkQ9CaO5/Lv0PCfUgCgtgRRQd+Qw6X2aLDWyHq0STbd > UzgAnR7DtoAKbzLOdRSLWFPX4Qjp9UN5 > =k337 > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org