cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Viana <rvi...@agency.com>
Subject importing own classes inside XSP's
Date Wed, 24 Jan 2001 13:18:24 GMT
Hi there,

Im trying to do an import inside a XSP page using the <xsp:structure> tag,
the classes are inside a *.jar that I previously specified in the classpath
of my servlet engine (JRun3.0). 

This is how the import is done in the xsp:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="sample2.xsl" type="text/xsl"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
  <page title="TEST">
   <xsp:structure>
        <xsp:include>com.bon.dia.testsbean1.TestBean1</xsp:include>
   </xsp:structure>
    <xsp:logic>
        TestBean1 testBean = new TestBean1();
        String sourceXML = testBean.doXML(); 
    </xsp:logic>
  
    <p>
      This is the output:
      <xsp:expr>sourceXML</xsp:expr>
    </p>
  </page>
</xsp:page>


When I call the page I get these errors:

************************************************

java.lang.Exception: XSP Java Compiler: Compilation failed for _sample2.java
93: Undefined variable, class, or package name: com

    com.bon.dia.testsbean1.TestBean1

    ^

107: Class
_C_._tomcat3_2._jakarta_tomcat_3_2._webapps._cocoon._servlets._samplexsp.Tes
tBean1 not found.

        TestBean1 testBean = new TestBean1();

        ^

107: Class
_C_._tomcat3_2._jakarta_tomcat_3_2._webapps._cocoon._servlets._samplexsp.Tes
tBean1 not found.

        TestBean1 testBean = new TestBean1();

                                 ^

3 errors
***********************************************



Im using Jrun 3.0 and Cocoon 1.8.0


Any ideas what can be wrong?


Roberto.

Mime
View raw message