Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 4626 invoked from network); 2 Aug 2000 07:06:58 -0000 Received: from balld-0.dsl.speakeasy.net (HELO localhost.localdomain) (@216.254.77.75) by locus.apache.org with SMTP; 2 Aug 2000 07:06:58 -0000 Received: by localhost.localdomain (Postfix, from userid 501) id 47F734810; Wed, 2 Aug 2000 03:10:05 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 34ABB6029 for ; Wed, 2 Aug 2000 03:10:05 -0400 (EDT) Date: Wed, 2 Aug 2000 03:10:04 -0400 (EDT) From: Donald Ball X-Sender: balld@localhost.localdomain To: cocoon-dev@xml.apache.org Subject: Re: XSL/XSP In-Reply-To: <02d401bffbf0$6f39b940$fc03000a@resch.br.corp.super11.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Tue, 1 Aug 2000, Rogerio Lacerda wrote: > I'm trying to get session parameter, but this error raise: > > 25: Undefined variable or class name: request > String id = request.getParameter("id"); > > Whats the matter ??? The dynamic XSL cant get sessions parameters ??? > > The XML document is static, defined for other application... > > Regards, > > Roger > > PS:The source: > > > static private int counter = 0; > String id = request.getParameter("id"); > the statement needs to appear underneath your root element: static private int counter = 0; String id = request.getParameter("id"); xsp:logic elements outside of your root element are treated as class variables - they don't appear in a method. it's like writing: public class test { static private int counter = 0; String id = request.getParameter("id"); } even if request was in scope at the time, it's forbidden for statements to appear outside of a method or static initializer block. - donald