> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 11:45 AM > To: [EMAIL PROTECTED] > Subject: <xsp:structure> - question > > > Hi, > > I want to include my own Java-Class in my XSP-Page
<snip/> > <?xml version="1.0" encoding="ISO-8859-1"?> > <xsp:page language="java" > xmlns:xsp="http://apache.org/xsp"> > > <xsp:structure> > <xsp:include> <!-- Meine Klasse "execute_report" --></xsp:include> > </xsp:structure> correct. > > <results> > <xsp:logic> > String hello = null; > hello = get_g(); > <option> > <xsp:logic> > <xsp:attribute name="bla">hello</xsp:attribute> change the last line to: <xsp:attribute name="bla"><xsp:expr>hello</xsp:expr></xsp:attribute> You don't state what "doesn't work" but if you mean the page returned only a literal attribute bla="hello" then this should be your only problem from what I can see. > </xsp:logic> > </option> > </xsp:logic> > </results> > </xsp:page> > > > Where do I have to place my Java-Class. Under .../cocoon/Web-Inf/classes > (where I hava placed it right now!)? yes, that works - make sure that if your class is declared part of a package that you replicate the directory structure under WEB-INF/classes (many people seem to make that mistake) > How do I call methods, like my method get_g()? The same way you would from any java class (your usage above should work fine) since XSP generates and compiles a java file the first time your page is executed. I would highly recommend going to take a look at it. It's under your servlet container's work directory - most likely $TOMCAT_HOME/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon /www/jonny/filename_xsp.java - you may have to browse around for it if I've made incorrect guesses. HTH, Geoff Howard --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>