Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F687DE88 for ; Thu, 9 Aug 2012 10:42:18 +0000 (UTC) Received: (qmail 59970 invoked by uid 500); 9 Aug 2012 10:42:15 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 59663 invoked by uid 500); 9 Aug 2012 10:42:09 -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 59572 invoked by uid 99); 9 Aug 2012 10:42:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2012 10:42:07 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cjderham@gmail.com designates 209.85.161.173 as permitted sender) Received: from [209.85.161.173] (HELO mail-gg0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2012 10:41:59 +0000 Received: by ggna5 with SMTP id a5so355940ggn.18 for ; Thu, 09 Aug 2012 03:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=3MR1QRv77ppUC8pJDVN/QGDyIDJ+khn9PiBSzfUpLL0=; b=FjmEQyAbHOnSWDKQ4kaWK3k6oCbLUbdXlsRSuERciaiMmvflJP4V2tqg108D74UEiW W2NZgv5sxy2cxc+p4TwDczf0KG5ko3lD/cOK4X6v6t/2aNO09gsqtTvj+wUWFQn2zFoN gO600/3irDQa0sK+p5x6u9FTodwj8IQkB9cR5Z05hsdypO4gIcyJ7kH/ehpCX7sZqrdd leCUpyfvc4R13DGDDVOjSvWBCffus6BBqy6CSIS2qa5lDo/TBXbddruFnFJ1+r3+n3x1 kGOWhTBJ2i3RpyXxL47okDMmfFrZWiha+0H/NZF8ttchrryXJiAMUsgavW9NqONkPUgw s5Kg== Received: by 10.50.188.233 with SMTP id gd9mr465539igc.73.1344508898532; Thu, 09 Aug 2012 03:41:38 -0700 (PDT) MIME-Version: 1.0 Reply-To: chris@derham.me.uk Sender: cjderham@gmail.com Received: by 10.43.57.207 with HTTP; Thu, 9 Aug 2012 03:41:18 -0700 (PDT) In-Reply-To: <50268fbc-1a5c-4980-a539-c8d6ff0d77c4@email.android.com> References: <12552501.130.1344256661440.JavaMail.daniel@cleveland> <5020DDFA.2050405@apache.org> <0ab14cfb-b8c4-4541-b242-5c27686bac80@email.android.com> <50268fbc-1a5c-4980-a539-c8d6ff0d77c4@email.android.com> From: chris derham Date: Thu, 9 Aug 2012 07:41:18 -0300 X-Google-Sender-Auth: PLKWCWSRhT4ZfmZKTUokGBSPI_o Message-ID: Subject: Re: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl To: Tomcat Users List Content-Type: multipart/alternative; boundary=14dae934085d4b5eaf04c6d2df20 --14dae934085d4b5eaf04c6d2df20 Content-Type: text/plain; charset=ISO-8859-1 | I am 95% certain of what is happenning but haven't tested this. It will help your understanding if you read the EL specification, specifically the section in the Javadoc regarding how implementations are discovered. | Tomcat implements these rules. It is possible for an EL implementation to be loaded from an application. Everything will be fine EL-wise for the application that shipped with the EL implementation but things will | fall apart for any other application that tries to use EL since the implementation classes will not be visible. Mark, I don't understand one key component of your response. I don't pretend to understand the internals of tomcat, but I thought that I had a good grasp on how things were supposed to work. Please forgive me if I ask something stupid. You seem to say that the EL implementation will be loaded from the app2, as it has an implementation present in its lib. You then say that this won't be visible to app 1, presumably because this class is loaded into the app2's class loader. That bit matches up with my understanding on app class loaders in web containers - each app has its own, and they are separate preventing leakage from one app to another. The bit I don't really understand is when app 1 tries to run some EL code, surely the same mechanism should kick in and load an EL implementation. I get that app 1 doesn't have an impl in its lib folder, but I would expect the call to be passed to the tomcat shared class loader, whereby tomcat's EL impl is loaded from CATALINA_BASE/lib. You seem to imply that once tomcat has loaded a EL impl into the app2's classloader, that this some how breaks or dirties the tomcat shared classloader so that it can no longer work the way I describe above. Could you spare a minute to explain where my understanding falters? Thanks Chris --14dae934085d4b5eaf04c6d2df20--