You do not appear to have declared `keyword'.
i.e., try:
String keyword = request.getParameter("value");
Dave
----- Original Message -----
From: "Eric Everman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 3:46 PM
Subject: xsp request variable is not declaired
> Hi Everyone-
>
> Here is a newbe question: I'm trying to use the implicit 'request'
> variable in a xsp page, however, whenever I try to access it like this I
> get a NPE error at line x:
>
> <xsp:logic>
> keyword = request.getParameter("value"); //line x
> </xsp:logic>
>
> When I attempt to access it like this, I get an "illegal start of type"
> error at line x:
>
> <xsp:logic>
> String comment = "";
>
> if (request == null) { //line x
> comment = "Request is null";
> } else {
> comment = "Request is NOT null";
> }
> </xsp:logic>
>
> This seems to point to 'request' as not having been declared, doesn't
> it? Doing something like this works:
>
> <xsp:logic>
> String keyword = "C";
> </xsp:logic>
> <content>
> <esql:connection>
> <esql:pool>cocoon</esql:pool>
> <esql:execute-query>
> <!-- <xsp-request:get-parameter name="value"/> -->
> <esql:query>select * from Resources where ResourceName like
> '%<xsp:expr>keyword</xsp:expr>%'</esql:query>
> <esql:results>
> <esql:row-results>
> <row>
> <esql:get-columns/></row>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:connection>
>
> </content>
>
>
> Any ideas? This is driving me up the wall. I would post more of the
error
> code, config, etc, but it seems like this must be something major and
> (hopefully) obvious.
>
> Thanks,
>
> Eric Everman
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>