You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Luis Gois <lg...@despodata.pt> on 2000/11/23 18:41:44 UTC

A very simple question (REALLY!!!! But please, answer!)

Hello!
Just deployed Cocoon 1.8 with Tomcat 3.2b6 and, though all XSP examples
that came with Cocoon work fine, I can't seem to access my own
classes!!! I've created de context /cocoon and copyed all Cocoon
examples to the webapps/cocoon/servlets dir, so the Cocoon conf within
Tomcat must be OK, right? I've put my own classes at
webapps/cocoon/WEB-INF/classes dir, as I understand from Tomcat's
documentation. Do I need to set classpath stuff in any config file
somewhere? I really apreciate help on this, cause it seems something so
simple and I just can't get there!:(
	I also tried to access some servlet 2.2b classes (servlet.jar in tomcat
/lib dir, so it gets in TOMCAT classpath at startup sh) but it's methods
aren't found! I keep geting the same message :

java.lang.Exception: XSP Java Compiler: Compilation failed for
_index.java
     137: Method showDataAsTable(int, int) not found in class
_usr._appl._mercado._unstable._local._src._XSP._index.
               xspExpr(showDataAsTable(0,5), document)
                                      ^
     1 error

	(this is for may own classes at WEB-INF/classes/pt/grupes/java/dito/
	  with <xsp:include>pt.grupes.java.dito.*</xsp:include>	

java.lang.Exception: XSP Java Compiler: Compilation failed for
_index.java
     137: Method getInitParameter() not found in class
_usr._appl._mercado._unstable._local._src._XSP._index.
               xspExpr(getInitParameter(), document)
                                      ^
     1 error

(for servlet2.2	I get the same "Method (...) not found in class" error -
method 			getInitParameter() for  example)


I previously used JServ, so only servlet2.0 available.

Thanks in advance.
Luis Gois

Re: A very simple question (REALLY!!!! But please, answer!)

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

Luis Gois a écrit :
> 
> Hello!
> Just deployed Cocoon 1.8 with Tomcat 3.2b6 and, though all XSP examples
> that came with Cocoon work fine, I can't seem to access my own
> classes!!! I've created de context /cocoon and copyed all Cocoon
> examples to the webapps/cocoon/servlets dir, so the Cocoon conf within
> Tomcat must be OK, right? I've put my own classes at
> webapps/cocoon/WEB-INF/classes dir, as I understand from Tomcat's
> documentation. Do I need to set classpath stuff in any config file
> somewhere? I really apreciate help on this, cause it seems something so
> simple and I just can't get there!:(
>         I also tried to access some servlet 2.2b classes (servlet.jar in tomcat
> /lib dir, so it gets in TOMCAT classpath at startup sh) but it's methods
> aren't found! I keep geting the same message :
> 
> java.lang.Exception: XSP Java Compiler: Compilation failed for
> _index.java
>      137: Method showDataAsTable(int, int) not found in class
> _usr._appl._mercado._unstable._local._src._XSP._index.
>                xspExpr(showDataAsTable(0,5), document)
>                                       ^
>      1 error

I guess your XSP code is "<xsp:expr>showDataAsTable(0,5)</xsp:expr>".
But you need to specify on which object the method is called : you try
to call the method on the XSP-generated class...

Correct XSP code is something like
"<xsp:expr>myObject.showDataAsTable(0,5)</xsp:expr>".

-Sylvain