Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 50917 invoked from network); 15 Sep 2004 07:25:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Sep 2004 07:25:01 -0000 Received: (qmail 14703 invoked by uid 500); 15 Sep 2004 07:24:56 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 14442 invoked by uid 500); 15 Sep 2004 07:24:53 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 14427 invoked by uid 99); 15 Sep 2004 07:24:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 15 Sep 2004 00:24:52 -0700 Received: (qmail 11786 invoked from network); 15 Sep 2004 07:26:38 -0000 Received: from localhost (HELO nagoya) (127.0.0.1) by nagoya.betaversion.org with SMTP; 15 Sep 2004 07:26:38 -0000 Message-ID: <1147000408.1095233198764.JavaMail.apache@nagoya> Date: Wed, 15 Sep 2004 00:26:38 -0700 (PDT) From: commons-dev@jakarta.apache.org To: commons-dev@jakarta.apache.org Subject: [jira] Commented: (JELLY-45) resource lookup in compiled scripts does not work properly Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The following comment has been added to this issue: Author: dion gillard Created: Wed, 15 Sep 2004 12:26 AM Body: This is not just limited to compiled scripts either. I will commit a test for uncompiled scripts that fails too. --------------------------------------------------------------------- View this comment: http://issues.apache.org/jira/browse/JELLY-45?page=comments#action_53102 --------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/browse/JELLY-45 Here is an overview of the issue: --------------------------------------------------------------------- Key: JELLY-45 Summary: resource lookup in compiled scripts does not work properly Type: Bug Status: Open Priority: Major Project: jelly Components: core / taglib.core Fix Fors: 1.0 Assignee: dion gillard Reporter: Vincenz Braun Created: Thu, 20 Mar 2003 1:49 PM Updated: Wed, 15 Sep 2004 12:26 AM Description: Take the following code snippet: JellyContext context = new JellyContext(); URL url = ImportTestcase.class.getResource("/resources/import.jelly"); XMLOutput out = XMLOutput.createXMLOutput(System.out); // this works because of the created child context that has knowledge // of the URL context.runScript(url, out); // This does not work because context has no currentURL set // This results in a NullPointerException when resolving the // stylesheet Script script = context.compileScript(url); script.run(context, out); out.flush() A compiled script should manage the lookup of referenced resources by its own regardless of the context set. If you cache scripts and use different contexts you do not always know where the script is from. That's why context.setCurrentURL(...) is no solution. // import.jelly --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org