I.e.:
=====================================================
<?xml version="1.0"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
<content>
<xsp:logic>
String keyword = request.getParameter("value");
</xsp:logic>
The 'value' parameter was: <xsp:expr>keyword</xsp:expr>
</content>
</xsp:page>
=====================================================
I think the problem might come from the fact that until first XML data is emited, you are not in the context of the request handler, but in the context of the class. I am not 100% sure, but it would be easy for you to check if you looked at the generated source code. The "request" variable probably isn't set until you are actually in the handler method.
Also, the namespace URI you have for xsp prefix (xmlns:xsp="http://apache.org/xsp") seems to be correct - that's what the xsp.xsl logicsheet is using.
G'luck.
--
Ilya
Eric Everman wrote:
At 10/28/2002, you wrote:You do not appear to have declared `keyword'.i.e., try: String keyword = request.getParameter("value"); Dave
Ha, fair enough. But believe it or not, this is a copy/paste error. Here is the simplest xsp page that causes the problem (verbatim this time):
=====================================================
<?xml version="1.0"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
<xsp:logic>
String keyword = request.getParameter("value");
</xsp:logic>
<content>
The 'value' parameter was: <xsp:expr>keyword</xsp:expr>
</content>
</xsp:page>
=====================================================
This xsp causes a NPE:
java.lang.NullPointerException
at org.apache.cocoon.www.examples.db1_xsp.(D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\cctest\cocoon-files\org/apache/cocoon/www/examples\db1_xsp.java:62)
Line 62 is "String keyword = request.getParameter("value");"
Sorry for the initial mis-post. Any ideas?
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]>