cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett McLaughlin" <brettmclaugh...@earthlink.net>
Subject Help on request variable in XSP
Date Fri, 24 Mar 2000 18:05:27 GMT
Is there something particular that has to be done to get access to the
request variable in XSP?

In this XSP page:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<?xml-stylesheet href="XSL/JavaXML.fo.xsl" type="text/xsl"?>

<xsp:page language="java"
                xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>

 <xsp:logic>
   private boolean isAuthor() {
     String role = request.getParameterValues("userRole")[0];

     is (role.equals("author")) {
       return true;
     } else {
       return false;
     }
   }
 </xsp:logic>

  <root>
    <!-- some content -->
  </root>
</xsp:page>

It gives me the following error every time:

java.lang.Exception: XSP Java Compiler: Compilation failed for
_chapterOne.java
25: Undefined variable or class name: request
  String role = request.getParameterValues("userRole")[0];

1 error
.... (stack trace ending at XSPJavaProcessor)

any ideas, please?

Thanks,
Brett


-----
Brett McLaughlin
Metro Information Systems
Work: (972) 724-3161
Mobile: (817) 825-7187


Mime
View raw message