cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Eymere <...@intergate.ca>
Subject error with xsp code
Date Wed, 21 Feb 2001 08:36:51 GMT
This should be pretty easy...

I have been trying to use the code below that was posted to the group
about 10 days ago:

<?xml version="1.0"?>
<!-- edited with XML Spy v3.5 (http://www.xmlspy.com) by john menke
(eagle
information systems) -->
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<page title="My Page">
<xsp:logic> String[] param = request.getParameterValues("dummy");
String stylesheet;
if (param != null) {
stylesheet = "pdf.xsl";
} else {
stylesheet = "html.xsl";
} </xsp:logic>
<xsp:pi target="xml-stylesheet">
                href="<xsp:expr>stylesheet</xsp:expr>"
                type="text/xsl"
</xsp:pi>

When I try to run the code I get the following error:

java.lang.Exception: XSP Java Compiler: Compilation failed for
_test.java
28: Type expected.
  if (param != null) {
  ^
1 error

Can anyone help me get around this error?

Mime
View raw message