cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: XSL/XSP
Date Wed, 02 Aug 2000 11:08:51 GMT
Donald Ball <balld@webslingerZ.com> wrote:
>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.

Er, I have to be pedantic here. The rest of what you said is right, of 
course, but... although class test wouldn't compile because the request 
object isn't declared, if you did declare it:

public class test {

   static private int counter = 0;
   HttpServletRequest request = new DummyRequest ();
   String id = request.getParameter("id");

}

then it could compile. String id = request.getParameter (id) is a perfectly 
valid package-private declaration. Also, statements can appear in instance 
initializers (methods with no header at all, like this {x=y;} ), not just 
methods or static initializers.


--
Robin Green
i-tao Ltd.
4 Skyline Village
Limeharbour
London E14 9TS
United Kingdom
Phone +44 20 7537 2233  Fax +44 70 8081 5118
http://www.i-tao.com


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message