Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B3DF10B08 for ; Mon, 8 Jul 2013 05:39:44 +0000 (UTC) Received: (qmail 75887 invoked by uid 500); 8 Jul 2013 05:39:43 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 75598 invoked by uid 500); 8 Jul 2013 05:39:43 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 75589 invoked by uid 99); 8 Jul 2013 05:39:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jul 2013 05:39:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [209.85.220.41] (HELO mail-pa0-f41.google.com) (209.85.220.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jul 2013 05:39:36 +0000 Received: by mail-pa0-f41.google.com with SMTP id bj3so4008922pad.14 for ; Sun, 07 Jul 2013 22:38:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=tWKndWt/eXcCxuVQjqj7emr55VDUOPKyxUgzvJA23BA=; b=n8qDRS6wKd9NdoHQxNua+9xev6Vt+48quLqYH/b6/VwnnfqpTrP7yLQPkcuQEpAtY1 5Je97NZ+dgcxt7vXvSbHMaXRSU3M8yZEKtSo3osb2ftjLunudbXfZPrG3a/Tm3zodg6f SgLgIDSYzewGX8UnPIaW2Myy0bNpzItSA9PFg4l8067lLNRtzgoARco8rh787UapBlyO KMvlkM8Mu46LQjPZ8IrUOiYpbRJP1AEVXCsGlO9iUzYZ4B5bO7hwn8wXo9wZ1cRrivh2 /9XvC937MkVkUcqnCuXUzoKZVYtRZqHdwl4xE0Rv1O6IDOqecmk2CaaU5sWh0TTveV9D oG6Q== X-Received: by 10.66.146.66 with SMTP id ta2mr21512071pab.11.1373261935924; Sun, 07 Jul 2013 22:38:55 -0700 (PDT) Received: from [10.0.1.22] (c-24-16-133-248.hsd1.wa.comcast.net. [24.16.133.248]) by mx.google.com with ESMTPSA id y9sm20355559pbb.46.2013.07.07.22.38.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 22:38:53 -0700 (PDT) Sender: Jeremy Boynes Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Jasper improvements/XML handling From: Jeremy Boynes In-Reply-To: Date: Sun, 7 Jul 2013 22:38:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <5CD26D21-C2F5-4F1D-AF51-A2868D407829@apache.org> References: <3729862D-8A29-4F18-BF4F-77BA0710D3B5@nicholaswilliams.net> <51B78A5A.1020004@apache.org> <12D01606-88EC-4CB0-AAFA-E4B1020F1D69@nicholaswilliams.net> To: "Tomcat Developers List" X-Mailer: Apple Mail (2.1508) X-Gm-Message-State: ALoCoQmJYV2ZJKwb2qDcam8FcwKu4rALx5n8GL3J/y+L8qXgPyB1CuNJGFDTJI+qJ75X92SrE/Xb X-Virus-Checked: Checked by ClamAV on apache.org On Jun 25, 2013, at 10:44 PM, Jeremy Boynes wrote: > I have been thinking about improvements to Jasper as well around = better support for Servlet 3.0 concepts. One area would be decoupling it = from Tomcat, bootstrapping using an SCI as hinted in ContextConfig. I'd = also be interested in improving the Ant task as well, such as support = for pre-compiling a separate package that would be treated as a web = fragment (including web.xml-less pre-compilation, generating a = web-fragment.xml rather than a web.xml snippet or potentially = eliminating the XML entirely if the generated code can be annotated with = @WebServlet). I started on this and ended up with two patches that are converging. For = 55166 (which started out somewhere different), I have a patch to update = local entity handling in Catalina's XML parsing; for 53737, I started to = have Jasper's translator rely only on the ServletContext and not need to = parse merged web.xml XML passed as a ServletContext attribute. These are = converging in a few areas. Jasper's descriptor parser (used for web.xml and TLDs) can only validate = DTD-based documents. I opened 55212 about adding it. Such a fix could = benefit from using the same resolver and cached copies that Catalina = does. This is less of an issue if Jasper uses the ServletContext as it = could rely on the container to parse/validate web.xml. It would still be = needed if we wanted JspC to validate files standalone but there is a = separate ant task that can do that. Another area of convergence is in parsing TLDs: currently both Catalina = and Jasper do it, differently. I believe Catalina only reads them to = detect the Listeners they define and if that's the case we could perhaps = add a SCI to Jasper that handled all TLD functionality including = registering the listeners programmatically (at least that's what Servlet = 8.3 implies) . That would remove Catalina's dependency on = web-jsptaglibrary*.xsd and on TLD-related classes. To support validation = though we would need to add the XSD-based validation in Jasper. Finally, Jasper parses these documents first into DOM and the into its = own version based on TreeNode (this is separate from the parse tree used = for actual JSPs). Jasper already depends on tomcat-util for the = JarScanner so could potentially use Digester for this in the same way = Catalina does. It would simplify the fragment merge logic in JspC if it = could reuse what was in Catalina's WebXml (something I'm hacking around = in 53737 right now). Alternatively, we could still eliminate the = intermediary DOM and TreeNode forms and use SAX or StAX to parse = directly into Jasper's objects - especially for TLDs where it is using = the spec's classes (TagLibraryInfo and TagInfo) as the model. I'm planning on merging these two patches and pressing on with a = converged solution, but probably won't be able to do much until next = weekend. Cheers Jeremy= --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org