You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Palka <to...@vanion.com> on 2000/05/11 02:40:06 UTC

XSP: can run examples but not my own simple stuff

I can view the sample XSP with no problems.  The error I get starts with:

java.lang.ClassNotFoundException: _D_._dev._cocoon._samples._xsp._sample
	at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)
	at java.lang.Exception.(Exception.java, Compiled Code)
	at java.lang.ClassNotFoundException.(ClassNotFoundException.java,
Compiled Code)
	at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)
	...


============= sample.xml ==============
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="simple.xsl" type="text/xsl"?>
<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XPS/Core">
  <page>
    <title>this is the title</title>
    <p>and this is the paragraph of text</p>
  </page>
</xsp:page>
=======================================

=============== simple.xsl ============
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="page">
    <xsl:processing-instruction name="cocoon-format">
    type="text/html"</xsl:processing-instruction>
    <html>
      <head>
        <title>
          <xsl:value-of select="title" />
        </title>
      </head>
      <body>
        <xsl:apply-templates />
      </body>
    </html>
  </xsl:template>
  <xsl:template match="p">
    <xsl:copy>
      <xsl:apply-templates />
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
========================================

I purposely included no xsp directives (other than xsp:page) to make it as
simple as possible.  Eventually what I'd like to do is to write a tag
library that would produce XML by querying the database, and have that
processed along with the XML document to serve on the web.  

I spent quite a while working on this, and I'm still not sure what the
problem is.  I would appreciate any pointers and hints.  Thank you,


/thomas