cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <rica...@apache.org>
Subject Re: XSL/XSP
Date Tue, 01 Aug 2000 23:53:42 GMT
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...
> PS:The source:
> 
>     <xsp:logic>
>       static private int counter = 0;
>       String id = request.getParameter("id");
>     </xsp:logic>

The "request" object is accessible _only_ inside the
"populateDocument" method (i.e. inside the user root
element). It's _not_ accessible inside the class-level
section (i.e., <xsp:logic> right beneath the root
<xsp:element>).

Note that this restriction is not specific to xsp. For
servlets, the "request" object is accessible _only_
inside the doGet/doPost/doService methods, never as
a static, class-level variable.

Mime
View raw message