cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Everman <ever...@precedadesign.com>
Subject xsp request variable is not declaired
Date Mon, 28 Oct 2002 20:46:32 GMT
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message